bug 7901 fixed - besselh.tst failed on Windows + move files in same module that the... 71/4571/4
Allan CORNET [Fri, 22 Jul 2011 09:33:55 +0000 (11:33 +0200)]
Change-Id: Id126e845a3e260d9a6e6f7f251593d16d60ebb05

33 files changed:
scilab/CHANGES_5.4.X
scilab/modules/elementary_functions/Makefile.am
scilab/modules/elementary_functions/Makefile.in
scilab/modules/elementary_functions/src/fortran/elementary_functions_f.vfproj
scilab/modules/elementary_functions/src/fortran/elementary_functions_f2c.vcxproj
scilab/modules/elementary_functions/src/fortran/elementary_functions_f2c.vcxproj.filters
scilab/modules/elementary_functions/src/fortran/ribesl.f [deleted file]
scilab/modules/elementary_functions/src/fortran/rjbesl.f [deleted file]
scilab/modules/elementary_functions/src/fortran/rkbesl.f [deleted file]
scilab/modules/elementary_functions/src/fortran/rybesl.f [deleted file]
scilab/modules/elementary_functions/src/fortran/zbeshg.f [deleted file]
scilab/modules/special_functions/Makefile.am
scilab/modules/special_functions/Makefile.in
scilab/modules/special_functions/sci_gateway/c/sci_besselh.c
scilab/modules/special_functions/src/c/LibScilab_Import.def
scilab/modules/special_functions/src/c/special_functions.vcxproj
scilab/modules/special_functions/src/c/special_functions.vcxproj.filters
scilab/modules/special_functions/src/c/special_functions_f_Import.def
scilab/modules/special_functions/src/c/zbeshv.c [new file with mode: 0644]
scilab/modules/special_functions/src/c/zbeshv.h [new file with mode: 0644]
scilab/modules/special_functions/src/fortran/dbesig.f [moved from scilab/modules/elementary_functions/src/fortran/dbesig.f with 100% similarity]
scilab/modules/special_functions/src/fortran/dbesjg.f [moved from scilab/modules/elementary_functions/src/fortran/dbesjg.f with 100% similarity]
scilab/modules/special_functions/src/fortran/dbeskg.f [moved from scilab/modules/elementary_functions/src/fortran/dbeskg.f with 100% similarity]
scilab/modules/special_functions/src/fortran/dbesyg.f [moved from scilab/modules/elementary_functions/src/fortran/dbesyg.f with 100% similarity]
scilab/modules/special_functions/src/fortran/special_functions_f.vfproj
scilab/modules/special_functions/src/fortran/special_functions_f2c.vcxproj
scilab/modules/special_functions/src/fortran/special_functions_f2c.vcxproj.filters
scilab/modules/special_functions/src/fortran/zbesig.f [moved from scilab/modules/elementary_functions/src/fortran/zbesig.f with 100% similarity]
scilab/modules/special_functions/src/fortran/zbesjg.f [moved from scilab/modules/elementary_functions/src/fortran/zbesjg.f with 100% similarity]
scilab/modules/special_functions/src/fortran/zbeskg.f [moved from scilab/modules/elementary_functions/src/fortran/zbeskg.f with 100% similarity]
scilab/modules/special_functions/src/fortran/zbesyg.f [moved from scilab/modules/elementary_functions/src/fortran/zbesyg.f with 100% similarity]
scilab/modules/special_functions/tests/nonreg_tests/bug_7901.dia.ref [new file with mode: 0644]
scilab/modules/special_functions/tests/nonreg_tests/bug_7901.tst [new file with mode: 0644]

index 5c0646e..0b696eb 100644 (file)
@@ -269,6 +269,8 @@ Bug fixes:
 
 * bug 7895 fixed - fft2() was broken on Windows with MKL wrapper.
 
+* bug 7901 fixed - besselh.tst failed on Windows.
+
 * bug 8608 fixed - dec2hex, hex2dec, dec2oct and oct2dec code have been simplified
                    and optimized.
 
index 313e2fd..0ce819f 100644 (file)
@@ -164,7 +164,6 @@ src/fortran/watan.f \
 src/fortran/wipowe.f \
 src/fortran/wacos.f \
 src/fortran/wdpow1.f \
-src/fortran/zbesjg.f \
 src/fortran/dmsum.f \
 src/fortran/dlgama.f \
 src/fortran/exch.f \
@@ -172,7 +171,6 @@ src/fortran/wsign.f \
 src/fortran/kronr.f \
 src/fortran/wrscal.f \
 src/fortran/pythag.f \
-src/fortran/dbeskg.f \
 src/fortran/dmmul1.f \
 src/fortran/dwpow.f \
 src/fortran/wmmul.f \
@@ -199,13 +197,11 @@ src/fortran/ddrdiv.f \
 src/fortran/dipow.f \
 src/fortran/wshrsl.f \
 src/fortran/wwrdiv.f \
-src/fortran/zbeshg.f \
 src/fortran/coshin.f \
 src/fortran/iwamax.f \
 src/fortran/dipowe.f \
 src/fortran/getorient.f \
 src/fortran/cusum.f \
-src/fortran/dbesig.f \
 src/fortran/d1mach.f \
 src/fortran/wbdiag.f \
 src/fortran/ddpow1.f \
@@ -217,11 +213,9 @@ src/fortran/getdimfromvar.f \
 src/fortran/gdcp2i.f \
 src/fortran/drdiv.f \
 src/fortran/wmsum.f \
-src/fortran/dbesyg.f \
 src/fortran/corth.f \
 src/fortran/mtran.f \
 src/fortran/wwpow.f \
-src/fortran/zbeskg.f \
 src/fortran/dvmul.f \
 src/fortran/wclmat.f \
 src/fortran/dsort.f \
@@ -248,14 +242,11 @@ src/fortran/wipow.f \
 src/fortran/wlog.f \
 src/fortran/infinity.f \
 src/fortran/dwpow1.f \
-src/fortran/zbesig.f \
 src/fortran/wmul.f \
 src/fortran/dad.f \
-src/fortran/dbesjg.f \
 src/fortran/dset.f \
 src/fortran/dtild.f \
 src/fortran/i1mach.f \
-src/fortran/zbesyg.f \
 src/fortran/dclmat.f \
 src/fortran/ortran.f \
 src/fortran/bdiag.f \
@@ -264,10 +255,6 @@ src/fortran/dmmul.f \
 src/fortran/wsqrt.f \
 src/fortran/israt.f \
 src/fortran/rat.f \
-src/fortran/ribesl.f \
-src/fortran/rjbesl.f \
-src/fortran/rkbesl.f \
-src/fortran/rybesl.f \
 src/fortran/sdot.f
 
 GATEWAY_C_SOURCES = sci_gateway/c/sci_isequal.c \
index 575b735..894547b 100644 (file)
@@ -166,24 +166,22 @@ am__objects_5 = psi.lo wasum.lo dexpm1.lo wwdiv.lo wdotcr.lo iset.lo \
        franck.lo dwpowe.lo rcsort.lo wddiv.lo lnblnk.lo entier.lo \
        round.lo cortr.lo simple.lo split.lo wdrdiv.lo imcopy.lo \
        cbal.lo cuproi.lo dsum.lo urand.lo intp.lo watan.lo wipowe.lo \
-       wacos.lo wdpow1.lo zbesjg.lo dmsum.lo dlgama.lo exch.lo \
-       wsign.lo kronr.lo wrscal.lo pythag.lo dbeskg.lo dmmul1.lo \
-       dwpow.lo wmmul.lo dsearch.lo ddif.lo wdiv.lo wtan.lo ccopy.lo \
-       ddpow.lo magic.lo wcerr.lo ivimp.lo cupro.lo dadd.lo calerf.lo \
-       isort.lo hilber.lo wdpowe.lo wmprod.lo wscal.lo dlblks.lo \
-       kronc.lo ddrdiv.lo dipow.lo wshrsl.lo wwrdiv.lo zbeshg.lo \
-       coshin.lo iwamax.lo dipowe.lo getorient.lo cusum.lo dbesig.lo \
-       d1mach.lo wbdiag.lo ddpow1.lo vpythag.lo isova0.lo wswap.lo \
-       wwpow1.lo getdimfromvar.lo gdcp2i.lo drdiv.lo wmsum.lo \
-       dbesyg.lo corth.lo mtran.lo wwpow.lo zbeskg.lo dvmul.lo \
-       wclmat.lo dsort.lo cerr.lo rcopy.lo wdpow.lo orthes.lo \
-       waxpy.lo coef.lo dwdiv.lo arcosh.lo wasin.lo wexpm1.lo \
-       ddpowe.lo nearfloat.lo dmprod.lo wwpowe.lo wdotci.lo dmcopy.lo \
-       wexchn.lo isoval.lo dwrdiv.lo wipow.lo wlog.lo infinity.lo \
-       dwpow1.lo zbesig.lo wmul.lo dad.lo dbesjg.lo dset.lo dtild.lo \
-       i1mach.lo zbesyg.lo dclmat.lo ortran.lo bdiag.lo wvmul.lo \
-       dmmul.lo wsqrt.lo israt.lo rat.lo ribesl.lo rjbesl.lo \
-       rkbesl.lo rybesl.lo sdot.lo
+       wacos.lo wdpow1.lo dmsum.lo dlgama.lo exch.lo wsign.lo \
+       kronr.lo wrscal.lo pythag.lo dmmul1.lo dwpow.lo wmmul.lo \
+       dsearch.lo ddif.lo wdiv.lo wtan.lo ccopy.lo ddpow.lo magic.lo \
+       wcerr.lo ivimp.lo cupro.lo dadd.lo calerf.lo isort.lo \
+       hilber.lo wdpowe.lo wmprod.lo wscal.lo dlblks.lo kronc.lo \
+       ddrdiv.lo dipow.lo wshrsl.lo wwrdiv.lo coshin.lo iwamax.lo \
+       dipowe.lo getorient.lo cusum.lo d1mach.lo wbdiag.lo ddpow1.lo \
+       vpythag.lo isova0.lo wswap.lo wwpow1.lo getdimfromvar.lo \
+       gdcp2i.lo drdiv.lo wmsum.lo corth.lo mtran.lo wwpow.lo \
+       dvmul.lo wclmat.lo dsort.lo cerr.lo rcopy.lo wdpow.lo \
+       orthes.lo waxpy.lo coef.lo dwdiv.lo arcosh.lo wasin.lo \
+       wexpm1.lo ddpowe.lo nearfloat.lo dmprod.lo wwpowe.lo wdotci.lo \
+       dmcopy.lo wexchn.lo isoval.lo dwrdiv.lo wipow.lo wlog.lo \
+       infinity.lo dwpow1.lo wmul.lo dad.lo dset.lo dtild.lo \
+       i1mach.lo dclmat.lo ortran.lo bdiag.lo wvmul.lo dmmul.lo \
+       wsqrt.lo israt.lo rat.lo sdot.lo
 am__objects_6 =
 am_libscielementary_functions_algo_la_OBJECTS = $(am__objects_1) \
        $(am__objects_2) $(am__objects_3) $(am__objects_4) \
@@ -743,7 +741,6 @@ src/fortran/watan.f \
 src/fortran/wipowe.f \
 src/fortran/wacos.f \
 src/fortran/wdpow1.f \
-src/fortran/zbesjg.f \
 src/fortran/dmsum.f \
 src/fortran/dlgama.f \
 src/fortran/exch.f \
@@ -751,7 +748,6 @@ src/fortran/wsign.f \
 src/fortran/kronr.f \
 src/fortran/wrscal.f \
 src/fortran/pythag.f \
-src/fortran/dbeskg.f \
 src/fortran/dmmul1.f \
 src/fortran/dwpow.f \
 src/fortran/wmmul.f \
@@ -778,13 +774,11 @@ src/fortran/ddrdiv.f \
 src/fortran/dipow.f \
 src/fortran/wshrsl.f \
 src/fortran/wwrdiv.f \
-src/fortran/zbeshg.f \
 src/fortran/coshin.f \
 src/fortran/iwamax.f \
 src/fortran/dipowe.f \
 src/fortran/getorient.f \
 src/fortran/cusum.f \
-src/fortran/dbesig.f \
 src/fortran/d1mach.f \
 src/fortran/wbdiag.f \
 src/fortran/ddpow1.f \
@@ -796,11 +790,9 @@ src/fortran/getdimfromvar.f \
 src/fortran/gdcp2i.f \
 src/fortran/drdiv.f \
 src/fortran/wmsum.f \
-src/fortran/dbesyg.f \
 src/fortran/corth.f \
 src/fortran/mtran.f \
 src/fortran/wwpow.f \
-src/fortran/zbeskg.f \
 src/fortran/dvmul.f \
 src/fortran/wclmat.f \
 src/fortran/dsort.f \
@@ -827,14 +819,11 @@ src/fortran/wipow.f \
 src/fortran/wlog.f \
 src/fortran/infinity.f \
 src/fortran/dwpow1.f \
-src/fortran/zbesig.f \
 src/fortran/wmul.f \
 src/fortran/dad.f \
-src/fortran/dbesjg.f \
 src/fortran/dset.f \
 src/fortran/dtild.f \
 src/fortran/i1mach.f \
-src/fortran/zbesyg.f \
 src/fortran/dclmat.f \
 src/fortran/ortran.f \
 src/fortran/bdiag.f \
@@ -843,10 +832,6 @@ src/fortran/dmmul.f \
 src/fortran/wsqrt.f \
 src/fortran/israt.f \
 src/fortran/rat.f \
-src/fortran/ribesl.f \
-src/fortran/rjbesl.f \
-src/fortran/rkbesl.f \
-src/fortran/rybesl.f \
 src/fortran/sdot.f
 
 GATEWAY_C_SOURCES = sci_gateway/c/sci_isequal.c \
@@ -2159,9 +2144,6 @@ wacos.lo: src/fortran/wacos.f
 wdpow1.lo: src/fortran/wdpow1.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o wdpow1.lo `test -f 'src/fortran/wdpow1.f' || echo '$(srcdir)/'`src/fortran/wdpow1.f
 
-zbesjg.lo: src/fortran/zbesjg.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbesjg.lo `test -f 'src/fortran/zbesjg.f' || echo '$(srcdir)/'`src/fortran/zbesjg.f
-
 dmsum.lo: src/fortran/dmsum.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dmsum.lo `test -f 'src/fortran/dmsum.f' || echo '$(srcdir)/'`src/fortran/dmsum.f
 
@@ -2183,9 +2165,6 @@ wrscal.lo: src/fortran/wrscal.f
 pythag.lo: src/fortran/pythag.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o pythag.lo `test -f 'src/fortran/pythag.f' || echo '$(srcdir)/'`src/fortran/pythag.f
 
-dbeskg.lo: src/fortran/dbeskg.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dbeskg.lo `test -f 'src/fortran/dbeskg.f' || echo '$(srcdir)/'`src/fortran/dbeskg.f
-
 dmmul1.lo: src/fortran/dmmul1.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dmmul1.lo `test -f 'src/fortran/dmmul1.f' || echo '$(srcdir)/'`src/fortran/dmmul1.f
 
@@ -2264,9 +2243,6 @@ wshrsl.lo: src/fortran/wshrsl.f
 wwrdiv.lo: src/fortran/wwrdiv.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o wwrdiv.lo `test -f 'src/fortran/wwrdiv.f' || echo '$(srcdir)/'`src/fortran/wwrdiv.f
 
-zbeshg.lo: src/fortran/zbeshg.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbeshg.lo `test -f 'src/fortran/zbeshg.f' || echo '$(srcdir)/'`src/fortran/zbeshg.f
-
 coshin.lo: src/fortran/coshin.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o coshin.lo `test -f 'src/fortran/coshin.f' || echo '$(srcdir)/'`src/fortran/coshin.f
 
@@ -2282,9 +2258,6 @@ getorient.lo: src/fortran/getorient.f
 cusum.lo: src/fortran/cusum.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o cusum.lo `test -f 'src/fortran/cusum.f' || echo '$(srcdir)/'`src/fortran/cusum.f
 
-dbesig.lo: src/fortran/dbesig.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dbesig.lo `test -f 'src/fortran/dbesig.f' || echo '$(srcdir)/'`src/fortran/dbesig.f
-
 d1mach.lo: src/fortran/d1mach.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o d1mach.lo `test -f 'src/fortran/d1mach.f' || echo '$(srcdir)/'`src/fortran/d1mach.f
 
@@ -2318,9 +2291,6 @@ drdiv.lo: src/fortran/drdiv.f
 wmsum.lo: src/fortran/wmsum.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o wmsum.lo `test -f 'src/fortran/wmsum.f' || echo '$(srcdir)/'`src/fortran/wmsum.f
 
-dbesyg.lo: src/fortran/dbesyg.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dbesyg.lo `test -f 'src/fortran/dbesyg.f' || echo '$(srcdir)/'`src/fortran/dbesyg.f
-
 corth.lo: src/fortran/corth.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o corth.lo `test -f 'src/fortran/corth.f' || echo '$(srcdir)/'`src/fortran/corth.f
 
@@ -2330,9 +2300,6 @@ mtran.lo: src/fortran/mtran.f
 wwpow.lo: src/fortran/wwpow.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o wwpow.lo `test -f 'src/fortran/wwpow.f' || echo '$(srcdir)/'`src/fortran/wwpow.f
 
-zbeskg.lo: src/fortran/zbeskg.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbeskg.lo `test -f 'src/fortran/zbeskg.f' || echo '$(srcdir)/'`src/fortran/zbeskg.f
-
 dvmul.lo: src/fortran/dvmul.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dvmul.lo `test -f 'src/fortran/dvmul.f' || echo '$(srcdir)/'`src/fortran/dvmul.f
 
@@ -2411,18 +2378,12 @@ infinity.lo: src/fortran/infinity.f
 dwpow1.lo: src/fortran/dwpow1.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dwpow1.lo `test -f 'src/fortran/dwpow1.f' || echo '$(srcdir)/'`src/fortran/dwpow1.f
 
-zbesig.lo: src/fortran/zbesig.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbesig.lo `test -f 'src/fortran/zbesig.f' || echo '$(srcdir)/'`src/fortran/zbesig.f
-
 wmul.lo: src/fortran/wmul.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o wmul.lo `test -f 'src/fortran/wmul.f' || echo '$(srcdir)/'`src/fortran/wmul.f
 
 dad.lo: src/fortran/dad.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dad.lo `test -f 'src/fortran/dad.f' || echo '$(srcdir)/'`src/fortran/dad.f
 
-dbesjg.lo: src/fortran/dbesjg.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dbesjg.lo `test -f 'src/fortran/dbesjg.f' || echo '$(srcdir)/'`src/fortran/dbesjg.f
-
 dset.lo: src/fortran/dset.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dset.lo `test -f 'src/fortran/dset.f' || echo '$(srcdir)/'`src/fortran/dset.f
 
@@ -2432,9 +2393,6 @@ dtild.lo: src/fortran/dtild.f
 i1mach.lo: src/fortran/i1mach.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o i1mach.lo `test -f 'src/fortran/i1mach.f' || echo '$(srcdir)/'`src/fortran/i1mach.f
 
-zbesyg.lo: src/fortran/zbesyg.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbesyg.lo `test -f 'src/fortran/zbesyg.f' || echo '$(srcdir)/'`src/fortran/zbesyg.f
-
 dclmat.lo: src/fortran/dclmat.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dclmat.lo `test -f 'src/fortran/dclmat.f' || echo '$(srcdir)/'`src/fortran/dclmat.f
 
@@ -2459,18 +2417,6 @@ israt.lo: src/fortran/israt.f
 rat.lo: src/fortran/rat.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o rat.lo `test -f 'src/fortran/rat.f' || echo '$(srcdir)/'`src/fortran/rat.f
 
-ribesl.lo: src/fortran/ribesl.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o ribesl.lo `test -f 'src/fortran/ribesl.f' || echo '$(srcdir)/'`src/fortran/ribesl.f
-
-rjbesl.lo: src/fortran/rjbesl.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o rjbesl.lo `test -f 'src/fortran/rjbesl.f' || echo '$(srcdir)/'`src/fortran/rjbesl.f
-
-rkbesl.lo: src/fortran/rkbesl.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o rkbesl.lo `test -f 'src/fortran/rkbesl.f' || echo '$(srcdir)/'`src/fortran/rkbesl.f
-
-rybesl.lo: src/fortran/rybesl.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o rybesl.lo `test -f 'src/fortran/rybesl.f' || echo '$(srcdir)/'`src/fortran/rybesl.f
-
 sdot.lo: src/fortran/sdot.f
        $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sdot.lo `test -f 'src/fortran/sdot.f' || echo '$(srcdir)/'`src/fortran/sdot.f
 
index 3c35944..805901e 100644 (file)
@@ -112,10 +112,6 @@ lib /DEF:"$(InputDir)integer_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:X
                <File RelativePath=".\d1mach.f"/>
                <File RelativePath=".\dad.f"/>
                <File RelativePath=".\dadd.f"/>
-               <File RelativePath=".\dbesig.f"/>
-               <File RelativePath=".\dbesjg.f"/>
-               <File RelativePath=".\dbeskg.f"/>
-               <File RelativePath=".\dbesyg.f"/>
                <File RelativePath=".\dclmat.f"/>
                <File RelativePath=".\ddif.f"/>
                <File RelativePath=".\ddpow.f"/>
@@ -175,11 +171,7 @@ lib /DEF:&quot;$(InputDir)integer_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X
                <File RelativePath=".\rat.f"/>
                <File RelativePath=".\rcopy.f"/>
                <File RelativePath=".\rcsort.f"/>
-               <File RelativePath=".\ribesl.f"/>
-               <File RelativePath=".\rjbesl.f"/>
-               <File RelativePath=".\rkbesl.f"/>
                <File RelativePath=".\round.f"/>
-               <File RelativePath=".\rybesl.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_abs.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_acos.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_asin.f"/>
@@ -269,12 +261,7 @@ lib /DEF:&quot;$(InputDir)integer_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X
                <File RelativePath=".\wwpow.f"/>
                <File RelativePath=".\wwpow1.f"/>
                <File RelativePath=".\wwpowe.f"/>
-               <File RelativePath=".\wwrdiv.f"/>
-               <File RelativePath=".\zbeshg.f"/>
-               <File RelativePath=".\zbesig.f"/>
-               <File RelativePath=".\zbesjg.f"/>
-               <File RelativePath=".\zbeskg.f"/>
-               <File RelativePath=".\zbesyg.f"/></Filter>
+               <File RelativePath=".\wwrdiv.f"/></Filter>
                <File RelativePath="..\..\..\..\bin\blasplus.lib"/>
                <File RelativePath="..\..\sci_gateway\elementary_functions_gateway.xml"/>
                <File RelativePath="..\..\..\..\bin\lapack.lib"/>
index a38e272..da7ffd1 100644 (file)
@@ -299,10 +299,6 @@ copy elementary_functions_f_header.def+elementary_functions_f.vcdef elementary_f
     <ClCompile Include="d1mach.c" />
     <ClCompile Include="dad.c" />
     <ClCompile Include="dadd.c" />
-    <ClCompile Include="dbesig.c" />
-    <ClCompile Include="dbesjg.c" />
-    <ClCompile Include="dbeskg.c" />
-    <ClCompile Include="dbesyg.c" />
     <ClCompile Include="dclmat.c" />
     <ClCompile Include="ddif.c" />
     <ClCompile Include="ddpow.c" />
@@ -362,11 +358,7 @@ copy elementary_functions_f_header.def+elementary_functions_f.vcdef elementary_f
     <ClCompile Include="rat.c" />
     <ClCompile Include="rcopy.c" />
     <ClCompile Include="rcsort.c" />
-    <ClCompile Include="ribesl.c" />
-    <ClCompile Include="rjbesl.c" />
-    <ClCompile Include="rkbesl.c" />
     <ClCompile Include="round.c" />
-    <ClCompile Include="rybesl.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_abs.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_acos.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_asin.c" />
@@ -457,11 +449,6 @@ copy elementary_functions_f_header.def+elementary_functions_f.vcdef elementary_f
     <ClCompile Include="wwpow1.c" />
     <ClCompile Include="wwpowe.c" />
     <ClCompile Include="wwrdiv.c" />
-    <ClCompile Include="zbeshg.c" />
-    <ClCompile Include="zbesig.c" />
-    <ClCompile Include="zbesjg.c" />
-    <ClCompile Include="zbeskg.c" />
-    <ClCompile Include="zbesyg.c" />
   </ItemGroup>
   <ItemGroup>
     <f2c_rule Include="arcosh.f" />
@@ -481,10 +468,6 @@ copy elementary_functions_f_header.def+elementary_functions_f.vcdef elementary_f
     <f2c_rule Include="d1mach.f" />
     <f2c_rule Include="dad.f" />
     <f2c_rule Include="dadd.f" />
-    <f2c_rule Include="dbesig.f" />
-    <f2c_rule Include="dbesjg.f" />
-    <f2c_rule Include="dbeskg.f" />
-    <f2c_rule Include="dbesyg.f" />
     <f2c_rule Include="dclmat.f" />
     <f2c_rule Include="ddif.f" />
     <f2c_rule Include="ddpow.f" />
@@ -544,11 +527,7 @@ copy elementary_functions_f_header.def+elementary_functions_f.vcdef elementary_f
     <f2c_rule Include="rat.f" />
     <f2c_rule Include="rcopy.f" />
     <f2c_rule Include="rcsort.f" />
-    <f2c_rule Include="ribesl.f" />
-    <f2c_rule Include="rjbesl.f" />
-    <f2c_rule Include="rkbesl.f" />
     <f2c_rule Include="round.f" />
-    <f2c_rule Include="rybesl.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_abs.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_acos.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_asin.f" />
@@ -639,11 +618,6 @@ copy elementary_functions_f_header.def+elementary_functions_f.vcdef elementary_f
     <f2c_rule Include="wwpow1.f" />
     <f2c_rule Include="wwpowe.f" />
     <f2c_rule Include="wwrdiv.f" />
-    <f2c_rule Include="zbeshg.f" />
-    <f2c_rule Include="zbesig.f" />
-    <f2c_rule Include="zbesjg.f" />
-    <f2c_rule Include="zbeskg.f" />
-    <f2c_rule Include="zbesyg.f" />
   </ItemGroup>
   <ItemGroup>
     <None Include="elementary_functions_Import.def" />
index 7f7097f..748ac9e 100644 (file)
     <ClCompile Include="dadd.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="dbesig.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="dbesjg.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="dbeskg.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="dbesyg.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="dclmat.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="rcsort.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="ribesl.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="rjbesl.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="rkbesl.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="round.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="rybesl.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_abs.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="wwrdiv.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="zbeshg.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="zbesig.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="zbesjg.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="zbeskg.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="zbesyg.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <f2c_rule Include="arcosh.f">
     <f2c_rule Include="dadd.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
-    <f2c_rule Include="dbesig.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="dbesjg.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="dbeskg.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="dbesyg.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
     <f2c_rule Include="dclmat.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
     <f2c_rule Include="rcsort.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
-    <f2c_rule Include="ribesl.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="rjbesl.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="rkbesl.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
     <f2c_rule Include="round.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
-    <f2c_rule Include="rybesl.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_abs.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
     <f2c_rule Include="wwrdiv.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
-    <f2c_rule Include="zbeshg.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="zbesig.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="zbesjg.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="zbeskg.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
-    <f2c_rule Include="zbesyg.f">
-      <Filter>Fortran files</Filter>
-    </f2c_rule>
   </ItemGroup>
   <ItemGroup>
     <None Include="elementary_functions_Import.def">
diff --git a/scilab/modules/elementary_functions/src/fortran/ribesl.f b/scilab/modules/elementary_functions/src/fortran/ribesl.f
deleted file mode 100644 (file)
index 6af1db8..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-      SUBROUTINE RIBESL(X,ALPHA,NB,IZE,B,NCALC)
-C-------------------------------------------------------------------
-C
-C  This routine calculates Bessel functions I SUB(N+ALPHA) (X)
-C  for non-negative argument X, and non-negative order N+ALPHA,
-C  with or without exponential scaling.
-C
-C
-C Explanation of variables in the calling sequence
-C
-C X     - Working precision non-negative real argument for which
-C         I's or exponentially scaled I's (I*EXP(-X))
-C         are to be calculated.  If I's are to be calculated,
-C         X must be less than EXPARG (see below).
-C ALPHA - Working precision fractional part of order for which
-C         I's or exponentially scaled I's (I*EXP(-X)) are
-C         to be calculated.  0 .LE. ALPHA .LT. 1.0.
-C NB    - Integer number of functions to be calculated, NB .GT. 0.
-C         The first function calculated is of order ALPHA, and the 
-C         last is of order (NB - 1 + ALPHA).
-C IZE   - Integer type.  IZE = 1 if unscaled I's are to calculated,
-C         and 2 if exponentially scaled I's are to be calculated.
-C B     - Working precision output vector of length NB.  If the routine
-C         terminates normally (NCALC=NB), the vector B contains the 
-C         functions I(ALPHA,X) through I(NB-1+ALPHA,X), or the
-C         corresponding exponentially scaled functions.
-C NCALC - Integer output variable indicating possible errors.
-C         Before using the vector B, the user should check that
-C         NCALC=NB, i.e., all orders have been calculated to
-C         the desired accuracy.  See error returns below.
-C 
-C
-C*******************************************************************
-C*******************************************************************
-C
-C Explanation of machine-dependent constants
-C
-C   beta   = Radix for the floating-point system
-C   minexp = Smallest representable power of beta
-C   maxexp = Smallest power of beta that overflows
-C   it     = Number of bits in the mantissa of a working precision
-C            variable
-C   NSIG   = Decimal significance desired.  Should be set to
-C            INT(LOG10(2)*it+1).  Setting NSIG lower will result
-C            in decreased accuracy while setting NSIG higher will
-C            increase CPU time without increasing accuracy.  The
-C            truncation error is limited to a relative error of
-C            T=.5*10**(-NSIG).
-C   ENTEN  = 10.0 ** K, where K is the largest integer such that
-C            ENTEN is machine-representable in working precision
-C   ENSIG  = 10.0 ** NSIG
-C   RTNSIG = 10.0 ** (-K) for the smallest integer K such that
-C            K .GE. NSIG/4
-C   ENMTEN = Smallest ABS(X) such that X/4 does not underflow
-C   XLARGE = Upper limit on the magnitude of X when IZE=2.  Bear
-C            in mind that if ABS(X)=N, then at least N iterations
-C            of the backward recursion will be executed.  The value
-C            of 10.0 ** 4 is used on every machine.
-C   EXPARG = Largest working precision argument that the library
-C            EXP routine can handle and upper limit on the
-C            magnitude of X when IZE=1; approximately 
-C            LOG(beta**maxexp)
-C
-C
-C     Approximate values for some important machines are:
-C
-C                        beta       minexp      maxexp       it
-C
-C  CRAY-1        (S.P.)    2        -8193        8191        48
-C  Cyber 180/855
-C    under NOS   (S.P.)    2         -975        1070        48
-C  IEEE (IBM/XT,
-C    SUN, etc.)  (S.P.)    2         -126         128        24
-C  IEEE (IBM/XT,
-C    SUN, etc.)  (D.P.)    2        -1022        1024        53
-C  IBM 3033      (D.P.)   16          -65          63        14
-C  VAX           (S.P.)    2         -128         127        24
-C  VAX D-Format  (D.P.)    2         -128         127        56
-C  VAX G-Format  (D.P.)    2        -1024        1023        53
-C
-C
-C                        NSIG       ENTEN       ENSIG      RTNSIG
-C
-C CRAY-1        (S.P.)    15       1.0E+2465   1.0E+15     1.0E-4
-C Cyber 180/855
-C   under NOS   (S.P.)    15       1.0E+322    1.0E+15     1.0E-4
-C IEEE (IBM/XT,
-C   SUN, etc.)  (S.P.)     8       1.0E+38     1.0E+8      1.0E-2
-C IEEE (IBM/XT,
-C   SUN, etc.)  (D.P.)    16       1.0D+308    1.0D+16     1.0D-4
-C IBM 3033      (D.P.)     5       1.0D+75     1.0D+5      1.0D-2
-C VAX           (S.P.)     8       1.0E+38     1.0E+8      1.0E-2
-C VAX D-Format  (D.P.)    17       1.0D+38     1.0D+17     1.0D-5
-C VAX G-Format  (D.P.)    16       1.0D+307    1.0D+16     1.0D-4
-C
-C
-C                         ENMTEN      XLARGE   EXPARG 
-C
-C CRAY-1        (S.P.)   1.84E-2466   1.0E+4    5677 
-C Cyber 180/855
-C   under NOS   (S.P.)   1.25E-293    1.0E+4     741
-C IEEE (IBM/XT,
-C   SUN, etc.)  (S.P.)   4.70E-38     1.0E+4      88  
-C IEEE (IBM/XT,
-C   SUN, etc.)  (D.P.)   8.90D-308    1.0D+4     709
-C IBM 3033      (D.P.)   2.16D-78     1.0D+4     174
-C VAX           (S.P.)   1.17E-38     1.0E+4      88
-C VAX D-Format  (D.P.)   1.17D-38     1.0D+4      88
-C VAX G-Format  (D.P.)   2.22D-308    1.0D+4     709
-C
-C*******************************************************************
-C*******************************************************************
-C
-C Error returns
-C
-C  In case of an error,  NCALC .NE. NB, and not all I's are
-C  calculated to the desired accuracy.
-C
-C  NCALC .LT. 0:  An argument is out of range. For example,
-C     NB .LE. 0, IZE is not 1 or 2, or IZE=1 and ABS(X) .GE. EXPARG.
-C     In this case, the B-vector is not calculated, and NCALC is
-C     set to MIN0(NB,0)-1 so that NCALC .NE. NB.
-C
-C  NB .GT. NCALC .GT. 0: Not all requested function values could
-C     be calculated accurately.  This usually occurs because NB is
-C     much larger than ABS(X).  In this case, B(N) is calculated
-C     to the desired accuracy for N .LE. NCALC, but precision
-C     is lost for NCALC .LT. N .LE. NB.  If B(N) does not vanish
-C     for N .GT. NCALC (because it is too small to be represented),
-C     and B(N)/B(NCALC) = 10**(-K), then only the first NSIG-K
-C     significant figures of B(N) can be trusted.
-C
-C
-C Intrinsic functions required are:
-C
-C     DBLE, EXP, DGAMMA, GAMMA, INT, MAX, MIN, REAL, SQRT
-C
-C
-C Acknowledgement
-C
-C  This program is based on a program written by David J.
-C  Sookne (2) that computes values of the Bessel functions J or
-C  I of real argument and integer order.  Modifications include
-C  the restriction of the computation to the I Bessel function
-C  of non-negative real argument, the extension of the computation
-C  to arbitrary positive order, the inclusion of optional
-C  exponential scaling, and the elimination of most underflow.
-C  An earlier version was published in (3).
-C
-C References: "A Note on Backward Recurrence Algorithms," Olver,
-C              F. W. J., and Sookne, D. J., Math. Comp. 26, 1972,
-C              pp 941-947.
-C
-C             "Bessel Functions of Real Argument and Integer Order,"
-C              Sookne, D. J., NBS Jour. of Res. B. 77B, 1973, pp
-C              125-132.
-C
-C             "ALGORITHM 597, Sequence of Modified Bessel Functions
-C              of the First Kind," Cody, W. J., Trans. Math. Soft.,
-C              1983, pp. 242-245.
-C
-C  Latest modification: May 30, 1989
-C
-C  Modified by: W. J. Cody and L. Stoltz
-C               Applied Mathematics Division
-C               Argonne National Laboratory
-C               Argonne, IL  60439
-C
-C-------------------------------------------------------------------
-      INTEGER IZE,K,L,MAGX,N,NB,NBMX,NCALC,NEND,NSIG,NSTART
-CS    REAL              GAMMA,
-      DOUBLE PRECISION DGAMMA,             
-     1 ALPHA,B,CONST,CONV,EM,EMPAL,EMP2AL,EN,ENMTEN,ENSIG,
-     2 ENTEN,EXPARG,FUNC,HALF,HALFX,ONE,P,PLAST,POLD,PSAVE,PSAVEL,
-     3 RTNSIG,SUM,TEMPA,TEMPB,TEMPC,TEST,TOVER,TWO,X,XLARGE,ZERO
-      DIMENSION B(NB)
-C-------------------------------------------------------------------
-C  Mathematical constants
-C-------------------------------------------------------------------
-CS    DATA ONE,TWO,ZERO,HALF,CONST/1.0E0,2.0E0,0.0E0,0.5E0,1.585E0/
-      DATA ONE,TWO,ZERO,HALF,CONST/1.0D0,2.0D0,0.0D0,0.5D0,1.585D0/
-C-------------------------------------------------------------------
-C  Machine-dependent parameters
-C-------------------------------------------------------------------
-CS    DATA NSIG,XLARGE,EXPARG /8,1.0E4,88.0E0/
-CS    DATA ENTEN,ENSIG,RTNSIG/1.0E38,1.0E8,1.0E-2/
-CS    DATA ENMTEN/4.7E-38/
-      DATA NSIG,XLARGE,EXPARG /16,1.0D4,709.0D0/
-      DATA ENTEN,ENSIG,RTNSIG/1.0D308,1.0D16,1.0D-4/
-      DATA ENMTEN/8.9D-308/
-C-------------------------------------------------------------------
-C  Statement functions for conversion
-C-------------------------------------------------------------------
-CS    CONV(N) = REAL(N)
-CS    FUNC(X) = GAMMA(X)
-      CONV(N) = DBLE(N)
-      FUNC(X) = DGAMMA(X)
-C-------------------------------------------------------------------
-C Check for X, NB, OR IZE out of range.
-C-------------------------------------------------------------------
-      IF ((NB.GT.0) .AND. (X .GE. ZERO) .AND.
-     1    (ALPHA .GE. ZERO) .AND. (ALPHA .LT. ONE) .AND.
-     2    (((IZE .EQ. 1) .AND. (X .LE. EXPARG)) .OR.
-     3     ((IZE .EQ. 2) .AND. (X .LE. XLARGE)))) THEN
-C-------------------------------------------------------------------
-C Use 2-term ascending series for small X
-C-------------------------------------------------------------------
-            NCALC = NB
-            MAGX = INT(X)
-            IF (X .GE. RTNSIG) THEN
-C-------------------------------------------------------------------
-C Initialize the forward sweep, the P-sequence of Olver
-C-------------------------------------------------------------------
-                  NBMX = NB-MAGX
-                  N = MAGX+1
-                  EN = CONV(N+N) + (ALPHA+ALPHA)
-                  PLAST = ONE
-                  P = EN / X
-C-------------------------------------------------------------------
-C Calculate general significance test
-C-------------------------------------------------------------------
-                  TEST = ENSIG + ENSIG
-                  IF (2*MAGX .GT. 5*NSIG) THEN
-                        TEST = SQRT(TEST*P)
-                     ELSE
-                        TEST = TEST / CONST**MAGX
-                  END IF
-                  IF (NBMX .GE. 3) THEN
-C-------------------------------------------------------------------
-C Calculate P-sequence until N = NB-1.  Check for possible overflow.
-C-------------------------------------------------------------------
-                     TOVER = ENTEN / ENSIG
-                     NSTART = MAGX+2
-                     NEND = NB - 1
-                     DO 100 K = NSTART, NEND
-                        N = K
-                        EN = EN + TWO
-                        POLD = PLAST
-                        PLAST = P
-                        P = EN * PLAST/X + POLD
-                        IF (P .GT. TOVER) THEN
-C-------------------------------------------------------------------
-C To avoid overflow, divide P-sequence by TOVER.  Calculate
-C P-sequence until ABS(P) .GT. 1.
-C-------------------------------------------------------------------
-                           TOVER = ENTEN
-                           P = P / TOVER
-                           PLAST = PLAST / TOVER
-                           PSAVE = P
-                           PSAVEL = PLAST
-                           NSTART = N + 1
-   60                      N = N + 1
-                              EN = EN + TWO
-                              POLD = PLAST
-                              PLAST = P
-                              P = EN * PLAST/X + POLD
-                           IF (P .LE. ONE) GO TO 60
-                           TEMPB = EN / X
-C-------------------------------------------------------------------
-C Calculate backward test, and find NCALC, the highest N
-C such that the test is passed.
-C-------------------------------------------------------------------
-                           TEST = POLD*PLAST / ENSIG
-                           TEST = TEST*(HALF-HALF/(TEMPB*TEMPB))
-                           P = PLAST * TOVER
-                           N = N - 1
-                           EN = EN - TWO
-                           NEND = MIN0(NB,N)
-                           DO 80 L = NSTART, NEND
-                              NCALC = L
-                              POLD = PSAVEL
-                              PSAVEL = PSAVE
-                              PSAVE = EN * PSAVEL/X + POLD
-                              IF (PSAVE*PSAVEL .GT. TEST) GO TO 90
-   80                      CONTINUE
-                           NCALC = NEND + 1
-   90                      NCALC = NCALC - 1
-                           GO TO 120
-                        END IF
-  100                CONTINUE
-                     N = NEND
-                     EN = CONV(N+N) + (ALPHA+ALPHA)
-C-------------------------------------------------------------------
-C Calculate special significance test for NBMX .GT. 2.
-C-------------------------------------------------------------------
-                     TEST = MAX(TEST,SQRT(PLAST*ENSIG)*SQRT(P+P))
-                  END IF
-C-------------------------------------------------------------------
-C Calculate P-sequence until significance test passed.
-C-------------------------------------------------------------------
-  110             N = N + 1
-                     EN = EN + TWO
-                     POLD = PLAST
-                     PLAST = P
-                     P = EN * PLAST/X + POLD
-                  IF (P .LT. TEST) GO TO 110
-C-------------------------------------------------------------------
-C Initialize the backward recursion and the normalization sum.
-C-------------------------------------------------------------------
-  120             N = N + 1
-                  EN = EN + TWO
-                  TEMPB = ZERO
-                  TEMPA = ONE / P
-                  EM = CONV(N) - ONE
-                  EMPAL = EM + ALPHA
-                  EMP2AL = (EM - ONE) + (ALPHA + ALPHA)
-                  SUM = TEMPA * EMPAL * EMP2AL / EM
-                  NEND = N - NB
-                  IF (NEND .LT. 0) THEN
-C-------------------------------------------------------------------
-C N .LT. NB, so store B(N) and set higher orders to zero.
-C-------------------------------------------------------------------
-                        B(N) = TEMPA
-                        NEND = -NEND
-                        DO 130 L = 1, NEND
-  130                      B(N+L) = ZERO
-                     ELSE
-                        IF (NEND .GT. 0) THEN
-C-------------------------------------------------------------------
-C Recur backward via difference equation, calculating (but
-C not storing) B(N), until N = NB.
-C-------------------------------------------------------------------
-                           DO 140 L = 1, NEND
-                              N = N - 1
-                              EN = EN - TWO
-                              TEMPC = TEMPB
-                              TEMPB = TEMPA
-                              TEMPA = (EN*TEMPB) / X + TEMPC
-                              EM = EM - ONE
-                              EMP2AL = EMP2AL - ONE
-                              IF (N .EQ. 1) GO TO 150
-                              IF (N .EQ. 2) EMP2AL = ONE
-                              EMPAL = EMPAL - ONE
-                              SUM = (SUM + TEMPA*EMPAL) * EMP2AL / EM
-  140                      CONTINUE
-                        END IF
-C-------------------------------------------------------------------
-C Store B(NB)
-C-------------------------------------------------------------------
-  150                   B(N) = TEMPA
-                        IF (NB .LE. 1) THEN
-                           SUM = (SUM + SUM) + TEMPA
-                           GO TO 230
-                        END IF
-C-------------------------------------------------------------------
-C Calculate and Store B(NB-1)
-C-------------------------------------------------------------------
-                        N = N - 1
-                        EN = EN - TWO
-                        B(N)  = (EN*TEMPA) / X + TEMPB
-                        IF (N .EQ. 1) GO TO 220
-                        EM = EM - ONE
-                        EMP2AL = EMP2AL - ONE
-                        IF (N .EQ. 2) EMP2AL = ONE
-                        EMPAL = EMPAL - ONE
-                        SUM = (SUM + B(N)*EMPAL) * EMP2AL / EM
-                  END IF
-                  NEND = N - 2
-                  IF (NEND .GT. 0) THEN
-C-------------------------------------------------------------------
-C Calculate via difference equation and store B(N), until N = 2.
-C-------------------------------------------------------------------
-                     DO 200 L = 1, NEND
-                        N = N - 1
-                        EN = EN - TWO
-                        B(N) = (EN*B(N+1)) / X +B(N+2)
-                        EM = EM - ONE
-                        EMP2AL = EMP2AL - ONE
-                        IF (N .EQ. 2) EMP2AL = ONE
-                        EMPAL = EMPAL - ONE
-                        SUM = (SUM + B(N)*EMPAL) * EMP2AL / EM
-  200                CONTINUE
-                  END IF
-C-------------------------------------------------------------------
-C Calculate B(1)
-C-------------------------------------------------------------------
-                  B(1) = TWO*EMPAL*B(2) / X + B(3)
-  220             SUM = (SUM + SUM) + B(1)
-C-------------------------------------------------------------------
-C Normalize.  Divide all B(N) by sum.
-C-------------------------------------------------------------------
-  230             IF (ALPHA .NE. ZERO)
-     1               SUM = SUM * FUNC(ONE+ALPHA) * (X*HALF)**(-ALPHA)
-                  IF (IZE .EQ. 1) SUM = SUM * EXP(-X)
-                  TEMPA = ENMTEN
-                  IF (SUM .GT. ONE) TEMPA = TEMPA * SUM
-                  DO 260 N = 1, NB
-                     IF (B(N) .LT. TEMPA) B(N) = ZERO
-                     B(N) = B(N) / SUM
-  260             CONTINUE
-                  RETURN
-C-------------------------------------------------------------------
-C Two-term ascending series for small X.
-C-------------------------------------------------------------------
-               ELSE
-                  TEMPA = ONE
-                  EMPAL = ONE + ALPHA
-                  HALFX = ZERO
-                  IF (X .GT. ENMTEN) HALFX = HALF * X
-                  IF (ALPHA .NE. ZERO) TEMPA = HALFX**ALPHA /FUNC(EMPAL)
-                  IF (IZE .EQ. 2) TEMPA = TEMPA * EXP(-X)
-                  TEMPB = ZERO
-                  IF ((X+ONE) .GT. ONE) TEMPB = HALFX * HALFX
-                  B(1) = TEMPA + TEMPA*TEMPB / EMPAL
-                  IF ((X .NE. ZERO) .AND. (B(1) .EQ. ZERO)) NCALC = 0
-                  IF (NB .GT. 1) THEN
-                     IF (X .EQ. ZERO) THEN
-                           DO 310 N = 2, NB
-                              B(N) = ZERO
-  310                      CONTINUE
-                        ELSE
-C-------------------------------------------------------------------
-C Calculate higher-order functions.
-C-------------------------------------------------------------------
-                           TEMPC = HALFX
-                           TOVER = (ENMTEN + ENMTEN) / X
-                           IF (TEMPB .NE. ZERO) TOVER = ENMTEN / TEMPB
-                           DO 340 N = 2, NB
-                              TEMPA = TEMPA / EMPAL
-                              EMPAL = EMPAL + ONE
-                              TEMPA = TEMPA * TEMPC
-                              IF (TEMPA .LE. TOVER*EMPAL) TEMPA = ZERO
-                              B(N) = TEMPA + TEMPA*TEMPB / EMPAL
-                              IF ((B(N) .EQ. ZERO) .AND. (NCALC .GT. N))
-     1                             NCALC = N-1
-  340                      CONTINUE
-                     END IF
-                  END IF
-            END IF
-         ELSE
-            NCALC = MIN0(NB,0)-1
-      END IF
-      RETURN
-C---------- Last line of RIBESL ----------
-      END
-
diff --git a/scilab/modules/elementary_functions/src/fortran/rjbesl.f b/scilab/modules/elementary_functions/src/fortran/rjbesl.f
deleted file mode 100644 (file)
index 26b28c1..0000000
+++ /dev/null
@@ -1,507 +0,0 @@
-      SUBROUTINE RJBESL(X, ALPHA, NB, B, NCALC)
-C---------------------------------------------------------------------
-C This routine calculates Bessel functions J sub(N+ALPHA) (X)
-C   for non-negative argument X, and non-negative order N+ALPHA.
-C
-C
-C  Explanation of variables in the calling sequence.
-C
-C   X     - working precision non-negative real argument for which
-C           J's are to be calculated.
-C   ALPHA - working precision fractional part of order for which
-C           J's or exponentially scaled J'r (J*exp(X)) are
-C           to be calculated.  0 <= ALPHA < 1.0.
-C   NB  - integer number of functions to be calculated, NB > 0.
-C           The first function calculated is of order ALPHA, and the
-C           last is of order (NB - 1 + ALPHA).
-C   B  - working precision output vector of length NB.  If RJBESL
-C           terminates normally (NCALC=NB), the vector B contains the
-C           functions J/ALPHA/(X) through J/NB-1+ALPHA/(X), or the
-C           corresponding exponentially scaled functions.
-C   NCALC - integer output variable indicating possible errors.
-C           Before using the vector B, the user should check that
-C           NCALC=NB, i.e., all orders have been calculated to
-C           the desired accuracy.  See Error Returns below.
-C
-C
-C*******************************************************************
-C*******************************************************************
-C
-C  Explanation of machine-dependent constants
-C
-C   it     = Number of bits in the mantissa of a working precision
-C            variable
-C   NSIG   = Decimal significance desired.  Should be set to
-C            INT(LOG10(2)*it+1).  Setting NSIG lower will result
-C            in decreased accuracy while setting NSIG higher will
-C            increase CPU time without increasing accuracy.  The
-C            truncation error is limited to a relative error of
-C            T=.5*10**(-NSIG).
-C   ENTEN  = 10.0 ** K, where K is the largest integer such that
-C            ENTEN is machine-representable in working precision
-C   ENSIG  = 10.0 ** NSIG
-C   RTNSIG = 10.0 ** (-K) for the smallest integer K such that
-C            K .GE. NSIG/4
-C   ENMTEN = Smallest ABS(X) such that X/4 does not underflow
-C   XLARGE = Upper limit on the magnitude of X.  If ABS(X)=N,
-C            then at least N iterations of the backward recursion
-C            will be executed.  The value of 10.0 ** 4 is used on
-C            every machine.
-C
-C
-C     Approximate values for some important machines are:
-C
-C
-C                            it    NSIG    ENTEN       ENSIG
-C
-C   CRAY-1        (S.P.)     48     15    1.0E+2465   1.0E+15
-C   Cyber 180/855
-C     under NOS   (S.P.)     48     15    1.0E+322    1.0E+15
-C   IEEE (IBM/XT,
-C     SUN, etc.)  (S.P.)     24      8    1.0E+38     1.0E+8
-C   IEEE (IBM/XT,
-C     SUN, etc.)  (D.P.)     53     16    1.0D+308    1.0D+16
-C   IBM 3033      (D.P.)     14      5    1.0D+75     1.0D+5
-C   VAX           (S.P.)     24      8    1.0E+38     1.0E+8
-C   VAX D-Format  (D.P.)     56     17    1.0D+38     1.0D+17
-C   VAX G-Format  (D.P.)     53     16    1.0D+307    1.0D+16
-C
-C
-C                           RTNSIG      ENMTEN      XLARGE
-C
-C   CRAY-1        (S.P.)    1.0E-4    1.84E-2466   1.0E+4
-C   Cyber 180/855
-C     under NOS   (S.P.)    1.0E-4    1.25E-293    1.0E+4
-C   IEEE (IBM/XT,
-C     SUN, etc.)  (S.P.)    1.0E-2    4.70E-38     1.0E+4
-C   IEEE (IBM/XT,
-C     SUN, etc.)  (D.P.)    1.0E-4    8.90D-308    1.0D+4
-C   IBM 3033      (D.P.)    1.0E-2    2.16D-78     1.0D+4
-C   VAX           (S.P.)    1.0E-2    1.17E-38     1.0E+4
-C   VAX D-Format  (D.P.)    1.0E-5    1.17D-38     1.0D+4
-C   VAX G-Format  (D.P.)    1.0E-4    2.22D-308    1.0D+4
-C
-C*******************************************************************
-C*******************************************************************
-C
-C  Error returns
-C
-C    In case of an error,  NCALC .NE. NB, and not all J's are
-C    calculated to the desired accuracy.
-C
-C    NCALC .LT. 0:  An argument is out of range. For example,
-C       NBES .LE. 0, ALPHA .LT. 0 or .GT. 1, or X is too large.
-C       In this case, B(1) is set to zero, the remainder of the
-C       B-vector is not calculated, and NCALC is set to
-C       MIN(NB,0)-1 so that NCALC .NE. NB.
-C
-C    NB .GT. NCALC .GT. 0: Not all requested function values could
-C       be calculated accurately.  This usually occurs because NB is
-C       much larger than ABS(X).  In this case, B(N) is calculated
-C       to the desired accuracy for N .LE. NCALC, but precision
-C       is lost for NCALC .LT. N .LE. NB.  If B(N) does not vanish
-C       for N .GT. NCALC (because it is too small to be represented),
-C       and B(N)/B(NCALC) = 10**(-K), then only the first NSIG-K
-C       significant figures of B(N) can be trusted.
-C
-C
-C  Intrinsic and other functions required are:
-C
-C     ABS, AINT, COS, DBLE, GAMMA (or DGAMMA), INT, MAX, MIN,
-C
-C     REAL, SIN, SQRT
-C
-C
-C  Acknowledgement
-C
-C   This program is based on a program written by David J. Sookne
-C   (2) that computes values of the Bessel functions J or I of real
-C   argument and integer order.  Modifications include the restriction
-C   of the computation to the J Bessel function of non-negative real
-C   argument, the extension of the computation to arbitrary positive
-C   order, and the elimination of most underflow.
-C
-C  References: "A Note on Backward Recurrence Algorithms," Olver,
-C               F. W. J., and Sookne, D. J., Math. Comp. 26, 1972,
-C               pp 941-947.
-C
-C              "Bessel Functions of Real Argument and Integer Order,"
-C               Sookne, D. J., NBS Jour. of Res. B. 77B, 1973, pp
-C               125-132.
-C
-C  Latest modification: March 19, 1990
-C
-C  Author: W. J. Cody
-C          Applied Mathematics Division
-C          Argonne National Laboratory
-C          Argonne, IL  60439
-C
-C---------------------------------------------------------------------
-      INTEGER I,J,K,L,M,MAGX,N,NB,NBMX,NCALC,NEND,NSTART
-CS    REAL               GAMMA,
-      DOUBLE PRECISION  DGAMMA,
-     1 ALPHA,ALPEM,ALP2EM,B,CAPP,CAPQ,CONV,EIGHTH,EM,EN,ENMTEN,ENSIG,
-     2 ENTEN,FACT,FOUR,FUNC,GNU,HALF,HALFX,ONE,ONE30,P,PI2,PLAST,
-     3 POLD,PSAVE,PSAVEL,RTNSIG,S,SUM,T,T1,TEMPA,TEMPB,TEMPC,TEST,
-     4 THREE,THREE5,TOVER,TWO,TWOFIV,TWOPI1,TWOPI2,X,XC,XIN,XK,XLARGE,
-     5 XM,VCOS,VSIN,Z,ZERO
-      DIMENSION B(NB), FACT(25)
-C---------------------------------------------------------------------
-C  Mathematical constants
-C
-C   PI2    - 2 / PI
-C   TWOPI1 - first few significant digits of 2 * PI
-C   TWOPI2 - (2*PI - TWOPI) to working precision, i.e.,
-C            TWOPI1 + TWOPI2 = 2 * PI to extra precision.
-C---------------------------------------------------------------------
-CS    DATA PI2, TWOPI1, TWOPI2 /0.636619772367581343075535E0,6.28125E0,
-CS   1 1.935307179586476925286767E-3/
-CS    DATA ZERO, EIGHTH, HALF, ONE /0.0E0,0.125E0,0.5E0,1.0E0/
-CS    DATA TWO, THREE, FOUR, TWOFIV /2.0E0,3.0E0,4.0E0,25.0E0/
-CS    DATA ONE30, THREE5 /130.0E0,35.0E0/
-      DATA PI2, TWOPI1, TWOPI2 /0.636619772367581343075535D0,6.28125D0,
-     1 1.935307179586476925286767D-3/
-      DATA ZERO, EIGHTH, HALF, ONE /0.0D0,0.125D0,0.5D0,1.0D0/
-      DATA TWO, THREE, FOUR, TWOFIV /2.0D0,3.0D0,4.0D0,25.0D0/
-      DATA ONE30, THREE5 /130.0D0,35.0D0/
-C---------------------------------------------------------------------
-C  Machine-dependent parameters
-C---------------------------------------------------------------------
-CS    DATA ENTEN, ENSIG, RTNSIG /1.0E38,1.0E8,1.0E-2/
-CS    DATA ENMTEN, XLARGE /1.2E-37,1.0E4/
-      DATA ENTEN, ENSIG, RTNSIG /1.0D308,1.0D16,1.0D-4/
-      DATA ENMTEN, XLARGE /8.9D-308,1.0D4/
-C---------------------------------------------------------------------
-C     Factorial(N)
-C---------------------------------------------------------------------
-CS    DATA FACT /1.0E0,1.0E0,2.0E0,6.0E0,24.0E0,1.2E2,7.2E2,5.04E3,
-CS   1 4.032E4,3.6288E5,3.6288E6,3.99168E7,4.790016E8,6.2270208E9,
-CS   2 8.71782912E10,1.307674368E12,2.0922789888E13,3.55687428096E14,
-CS   3 6.402373705728E15,1.21645100408832E17,2.43290200817664E18,
-CS   4 5.109094217170944E19,1.12400072777760768E21,
-CS   5 2.585201673888497664E22,6.2044840173323943936E23/
-      DATA FACT /1.0D0,1.0D0,2.0D0,6.0D0,24.0D0,1.2D2,7.2D2,5.04D3,
-     1 4.032D4,3.6288D5,3.6288D6,3.99168D7,4.790016D8,6.2270208D9,
-     2 8.71782912D10,1.307674368D12,2.0922789888D13,3.55687428096D14,
-     3 6.402373705728D15,1.21645100408832D17,2.43290200817664D18,
-     4 5.109094217170944D19,1.12400072777760768D21,
-     5 2.585201673888497664D22,6.2044840173323943936D23/
-C---------------------------------------------------------------------
-C Statement functions for conversion and the gamma function.
-C---------------------------------------------------------------------
-CS    CONV(I) = REAL(I)
-CS    FUNC(X) = GAMMA(X)
-      CONV(I) = DBLE(I)
-      FUNC(X) = DGAMMA(X)
-C---------------------------------------------------------------------
-C Check for out of range arguments.
-C---------------------------------------------------------------------
-      MAGX = INT(X)
-      IF ((NB.GT.0) .AND. (X.GE.ZERO) .AND. (X.LE.XLARGE) 
-     1       .AND. (ALPHA.GE.ZERO) .AND. (ALPHA.LT.ONE))  
-     2   THEN
-C---------------------------------------------------------------------
-C Initialize result array to zero.
-C---------------------------------------------------------------------
-            NCALC = NB
-            DO 20 I=1,NB
-              B(I) = ZERO
-   20       CONTINUE
-C---------------------------------------------------------------------
-C Branch to use 2-term ascending series for small X and asymptotic
-C form for large X when NB is not too large.
-C---------------------------------------------------------------------
-            IF (X.LT.RTNSIG) THEN
-C---------------------------------------------------------------------
-C Two-term ascending series for small X.
-C---------------------------------------------------------------------
-               TEMPA = ONE
-               ALPEM = ONE + ALPHA
-               HALFX = ZERO
-               IF (X.GT.ENMTEN) HALFX = HALF*X
-               IF (ALPHA.NE.ZERO)
-     1            TEMPA = HALFX**ALPHA/(ALPHA*FUNC(ALPHA))
-               TEMPB = ZERO
-               IF ((X+ONE).GT.ONE) TEMPB = -HALFX*HALFX
-               B(1) = TEMPA + TEMPA*TEMPB/ALPEM
-               IF ((X.NE.ZERO) .AND. (B(1).EQ.ZERO)) NCALC = 0
-               IF (NB .NE. 1) THEN
-                  IF (X .LE. ZERO) THEN
-                        DO 30 N=2,NB
-                          B(N) = ZERO
-   30                   CONTINUE
-                     ELSE
-C---------------------------------------------------------------------
-C Calculate higher order functions.
-C---------------------------------------------------------------------
-                        TEMPC = HALFX
-                        TOVER = (ENMTEN+ENMTEN)/X
-                        IF (TEMPB.NE.ZERO) TOVER = ENMTEN/TEMPB
-                        DO 50 N=2,NB
-                          TEMPA = TEMPA/ALPEM
-                          ALPEM = ALPEM + ONE
-                          TEMPA = TEMPA*TEMPC
-                          IF (TEMPA.LE.TOVER*ALPEM) TEMPA = ZERO
-                          B(N) = TEMPA + TEMPA*TEMPB/ALPEM
-                          IF ((B(N).EQ.ZERO) .AND. (NCALC.GT.N))
-     1                       NCALC = N-1
-   50                   CONTINUE
-                  END IF
-               END IF
-            ELSE IF ((X.GT.TWOFIV) .AND. (NB.LE.MAGX+1)) THEN
-C---------------------------------------------------------------------
-C Asymptotic series for X .GT. 21.0.
-C---------------------------------------------------------------------
-               XC = SQRT(PI2/X)
-               XIN = (EIGHTH/X)**2
-               M = 11
-               IF (X.GE.THREE5) M = 8
-               IF (X.GE.ONE30) M = 4
-               XM = FOUR*CONV(M)
-C---------------------------------------------------------------------
-C Argument reduction for SIN and COS routines.
-C---------------------------------------------------------------------
-               T = AINT(X/(TWOPI1+TWOPI2)+HALF)
-               Z = ((X-T*TWOPI1)-T*TWOPI2) - (ALPHA+HALF)/PI2
-               VSIN = SIN(Z)
-               VCOS = COS(Z)
-               GNU = ALPHA + ALPHA
-               DO 80 I=1,2
-                 S = ((XM-ONE)-GNU)*((XM-ONE)+GNU)*XIN*HALF
-                 T = (GNU-(XM-THREE))*(GNU+(XM-THREE))
-                 CAPP = S*T/FACT(2*M+1)
-                 T1 = (GNU-(XM+ONE))*(GNU+(XM+ONE))
-                 CAPQ = S*T1/FACT(2*M+2)
-                 XK = XM
-                 K = M + M
-                 T1 = T
-                 DO 70 J=2,M
-                   XK = XK - FOUR
-                   S = ((XK-ONE)-GNU)*((XK-ONE)+GNU)
-                   T = (GNU-(XK-THREE))*(GNU+(XK-THREE))
-                   CAPP = (CAPP+ONE/FACT(K-1))*S*T*XIN
-                   CAPQ = (CAPQ+ONE/FACT(K))*S*T1*XIN
-                   K = K - 2
-                   T1 = T
-   70            CONTINUE
-                 CAPP = CAPP + ONE
-                 CAPQ = (CAPQ+ONE)*(GNU*GNU-ONE)*(EIGHTH/X)
-                 B(I) = XC*(CAPP*VCOS-CAPQ*VSIN)
-                 IF (NB.EQ.1) GO TO 300
-                 T = VSIN
-                 VSIN = -VCOS
-                 VCOS = T
-                 GNU = GNU + TWO
-   80         CONTINUE
-C---------------------------------------------------------------------
-C If  NB .GT. 2, compute J(X,ORDER+I)  I = 2, NB-1
-C---------------------------------------------------------------------
-               IF (NB .GT. 2) THEN
-                  GNU = ALPHA + ALPHA + TWO
-                  DO 90 J=3,NB
-                    B(J) = GNU*B(J-1)/X - B(J-2)
-                    GNU = GNU + TWO
-   90             CONTINUE
-               END IF
-C---------------------------------------------------------------------
-C Use recurrence to generate results.  First initialize the
-C calculation of P*S.
-C---------------------------------------------------------------------
-            ELSE
-               NBMX = NB - MAGX
-               N = MAGX + 1
-               EN = CONV(N+N) + (ALPHA+ALPHA)
-               PLAST = ONE
-               P = EN/X
-C---------------------------------------------------------------------
-C Calculate general significance test.
-C---------------------------------------------------------------------
-               TEST = ENSIG + ENSIG
-               IF (NBMX .GE. 3) THEN
-C---------------------------------------------------------------------
-C Calculate P*S until N = NB-1.  Check for possible overflow.
-C---------------------------------------------------------------------
-                  TOVER = ENTEN/ENSIG
-                  NSTART = MAGX + 2
-                  NEND = NB - 1
-                  EN = CONV(NSTART+NSTART) - TWO + (ALPHA+ALPHA)
-                  DO 130 K=NSTART,NEND
-                     N = K
-                     EN = EN + TWO
-                     POLD = PLAST
-                     PLAST = P
-                     P = EN*PLAST/X - POLD
-                     IF (P.GT.TOVER) THEN
-C---------------------------------------------------------------------
-C To avoid overflow, divide P*S by TOVER.  Calculate P*S until
-C ABS(P) .GT. 1.
-C---------------------------------------------------------------------
-                        TOVER = ENTEN
-                        P = P/TOVER
-                        PLAST = PLAST/TOVER
-                        PSAVE = P
-                        PSAVEL = PLAST
-                        NSTART = N + 1
-  100                   N = N + 1
-                           EN = EN + TWO
-                           POLD = PLAST
-                           PLAST = P
-                           P = EN*PLAST/X - POLD
-                        IF (P.LE.ONE) GO TO 100
-                        TEMPB = EN/X
-C---------------------------------------------------------------------
-C Calculate backward test and find NCALC, the highest N such that
-C the test is passed.
-C---------------------------------------------------------------------
-                        TEST = POLD*PLAST*(HALF-HALF/(TEMPB*TEMPB))
-                        TEST = TEST/ENSIG
-                        P = PLAST*TOVER
-                        N = N - 1
-                        EN = EN - TWO
-                        NEND = MIN(NB,N)
-                        DO 110 L=NSTART,NEND
-                           POLD = PSAVEL
-                           PSAVEL = PSAVE
-                           PSAVE = EN*PSAVEL/X - POLD
-                           IF (PSAVE*PSAVEL.GT.TEST) THEN
-                              NCALC = L - 1
-                              GO TO 190
-                           END IF
-  110                   CONTINUE
-                        NCALC = NEND
-                        GO TO 190
-                     END IF
-  130             CONTINUE
-                  N = NEND
-                  EN = CONV(N+N) + (ALPHA+ALPHA)
-C---------------------------------------------------------------------
-C Calculate special significance test for NBMX .GT. 2.
-C---------------------------------------------------------------------
-                  TEST = MAX(TEST,SQRT(PLAST*ENSIG)*SQRT(P+P))
-               END IF
-C---------------------------------------------------------------------
-C Calculate P*S until significance test passes.
-C---------------------------------------------------------------------
-  140          N = N + 1
-                  EN = EN + TWO
-                  POLD = PLAST
-                  PLAST = P
-                  P = EN*PLAST/X - POLD
-               IF (P.LT.TEST) GO TO 140
-C---------------------------------------------------------------------
-C Initialize the backward recursion and the normalization sum.
-C---------------------------------------------------------------------
-  190          N = N + 1
-               EN = EN + TWO
-               TEMPB = ZERO
-               TEMPA = ONE/P
-               M = 2*N - 4*(N/2)
-               SUM = ZERO
-               EM = CONV(N/2)
-               ALPEM = (EM-ONE) + ALPHA
-               ALP2EM = (EM+EM) + ALPHA
-               IF (M .NE. 0) SUM = TEMPA*ALPEM*ALP2EM/EM
-               NEND = N - NB
-               IF (NEND .GT. 0) THEN
-C---------------------------------------------------------------------
-C Recur backward via difference equation, calculating (but not
-C storing) B(N), until N = NB.
-C---------------------------------------------------------------------
-                  DO 200 L=1,NEND
-                     N = N - 1
-                     EN = EN - TWO
-                     TEMPC = TEMPB
-                     TEMPB = TEMPA
-                     TEMPA = (EN*TEMPB)/X - TEMPC
-                     M = 2 - M
-                     IF (M .NE. 0) THEN
-                        EM = EM - ONE
-                        ALP2EM = (EM+EM) + ALPHA
-                        IF (N.EQ.1) GO TO 210
-                        ALPEM = (EM-ONE) + ALPHA
-                        IF (ALPEM.EQ.ZERO) ALPEM = ONE
-                        SUM = (SUM+TEMPA*ALP2EM)*ALPEM/EM
-                     END IF
-  200             CONTINUE
-               END IF
-C---------------------------------------------------------------------
-C Store B(NB).
-C---------------------------------------------------------------------
-  210          B(N) = TEMPA
-               IF (NEND .GE. 0) THEN
-                  IF (NB .LE. 1) THEN
-                        ALP2EM = ALPHA
-                        IF ((ALPHA+ONE).EQ.ONE) ALP2EM = ONE
-                        SUM = SUM + B(1)*ALP2EM
-                        GO TO 250
-                     ELSE
-C---------------------------------------------------------------------
-C Calculate and store B(NB-1).
-C---------------------------------------------------------------------
-                        N = N - 1
-                        EN = EN - TWO
-                        B(N) = (EN*TEMPA)/X - TEMPB
-                        IF (N.EQ.1) GO TO 240
-                        M = 2 - M
-                        IF (M .NE. 0) THEN
-                           EM = EM - ONE
-                           ALP2EM = (EM+EM) + ALPHA
-                           ALPEM = (EM-ONE) + ALPHA
-                           IF (ALPEM.EQ.ZERO) ALPEM = ONE
-                           SUM = (SUM+B(N)*ALP2EM)*ALPEM/EM
-                        END IF
-                  END IF
-               END IF
-               NEND = N - 2
-               IF (NEND .NE. 0) THEN
-C---------------------------------------------------------------------
-C Calculate via difference equation and store B(N), until N = 2.
-C---------------------------------------------------------------------
-                  DO 230 L=1,NEND
-                     N = N - 1
-                     EN = EN - TWO
-                     B(N) = (EN*B(N+1))/X - B(N+2)
-                     M = 2 - M
-                     IF (M .NE. 0) THEN
-                        EM = EM - ONE
-                        ALP2EM = (EM+EM) + ALPHA
-                        ALPEM = (EM-ONE) + ALPHA
-                        IF (ALPEM.EQ.ZERO) ALPEM = ONE
-                        SUM = (SUM+B(N)*ALP2EM)*ALPEM/EM
-                     END IF
-  230             CONTINUE
-               END IF
-C---------------------------------------------------------------------
-C Calculate B(1).
-C---------------------------------------------------------------------
-               B(1) = TWO*(ALPHA+ONE)*B(2)/X - B(3)
-  240          EM = EM - ONE
-               ALP2EM = (EM+EM) + ALPHA
-               IF (ALP2EM.EQ.ZERO) ALP2EM = ONE
-               SUM = SUM + B(1)*ALP2EM
-C---------------------------------------------------------------------
-C Normalize.  Divide all B(N) by sum.
-C---------------------------------------------------------------------
-  250          IF ((ALPHA+ONE).NE.ONE)
-     1              SUM = SUM*FUNC(ALPHA)*(X*HALF)**(-ALPHA)
-               TEMPA = ENMTEN
-               IF (SUM.GT.ONE) TEMPA = TEMPA*SUM
-               DO 260 N=1,NB
-                 IF (ABS(B(N)).LT.TEMPA) B(N) = ZERO
-                 B(N) = B(N)/SUM
-  260          CONTINUE
-            END IF
-C---------------------------------------------------------------------
-C Error return -- X, NB, or ALPHA is out of range.
-C---------------------------------------------------------------------
-         ELSE
-            B(1) = ZERO
-            NCALC = MIN(NB,0) - 1
-      END IF
-C---------------------------------------------------------------------
-C Exit
-C---------------------------------------------------------------------
-  300 RETURN
-C ---------- Last line of RJBESL ----------
-      END
-
diff --git a/scilab/modules/elementary_functions/src/fortran/rkbesl.f b/scilab/modules/elementary_functions/src/fortran/rkbesl.f
deleted file mode 100644 (file)
index 73a5a3b..0000000
+++ /dev/null
@@ -1,491 +0,0 @@
-      SUBROUTINE RKBESL(X,ALPHA,NB,IZE,BK,NCALC)
-C-------------------------------------------------------------------
-C
-C  This FORTRAN 77 routine calculates modified Bessel functions
-C  of the second kind, K SUB(N+ALPHA) (X), for non-negative
-C  argument X, and non-negative order N+ALPHA, with or without
-C  exponential scaling.
-C
-C  Explanation of variables in the calling sequence
-C
-C  Description of output values ..
-C
-C X     - Working precision non-negative real argument for which
-C         K's or exponentially scaled K's (K*EXP(X))
-C         are to be calculated.  If K's are to be calculated,
-C         X must not be greater than XMAX (see below).
-C ALPHA - Working precision fractional part of order for which 
-C         K's or exponentially scaled K's (K*EXP(X)) are
-C         to be calculated.  0 .LE. ALPHA .LT. 1.0.
-C NB    - Integer number of functions to be calculated, NB .GT. 0.
-C         The first function calculated is of order ALPHA, and the 
-C         last is of order (NB - 1 + ALPHA).
-C IZE   - Integer type.  IZE = 1 if unscaled K's are to be calculated,
-C         and 2 if exponentially scaled K's are to be calculated.
-C BK    - Working precision output vector of length NB.  If the
-C         routine terminates normally (NCALC=NB), the vector BK
-C         contains the functions K(ALPHA,X), ... , K(NB-1+ALPHA,X),
-C         or the corresponding exponentially scaled functions.
-C         If (0 .LT. NCALC .LT. NB), BK(I) contains correct function
-C         values for I .LE. NCALC, and contains the ratios
-C         K(ALPHA+I-1,X)/K(ALPHA+I-2,X) for the rest of the array.
-C NCALC - Integer output variable indicating possible errors.
-C         Before using the vector BK, the user should check that 
-C         NCALC=NB, i.e., all orders have been calculated to
-C         the desired accuracy.  See error returns below.
-C
-C
-C*******************************************************************
-C*******************************************************************
-C
-C Explanation of machine-dependent constants
-C
-C   beta   = Radix for the floating-point system
-C   minexp = Smallest representable power of beta
-C   maxexp = Smallest power of beta that overflows
-C   EPS    = The smallest positive floating-point number such that 
-C            1.0+EPS .GT. 1.0
-C   XMAX   = Upper limit on the magnitude of X when IZE=1;  Solution 
-C            to equation:
-C               W(X) * (1-1/8X+9/128X**2) = beta**minexp
-C            where  W(X) = EXP(-X)*SQRT(PI/2X)
-C   SQXMIN = Square root of beta**minexp
-C   XINF   = Largest positive machine number; approximately
-C            beta**maxexp
-C   XMIN   = Smallest positive machine number; approximately
-C            beta**minexp
-C
-C
-C     Approximate values for some important machines are:
-C
-C                          beta       minexp      maxexp      EPS
-C
-C  CRAY-1        (S.P.)      2        -8193        8191    7.11E-15
-C  Cyber 180/185 
-C    under NOS   (S.P.)      2         -975        1070    3.55E-15
-C  IEEE (IBM/XT,
-C    SUN, etc.)  (S.P.)      2         -126         128    1.19E-7
-C  IEEE (IBM/XT,
-C    SUN, etc.)  (D.P.)      2        -1022        1024    2.22D-16
-C  IBM 3033      (D.P.)     16          -65          63    2.22D-16
-C  VAX           (S.P.)      2         -128         127    5.96E-8
-C  VAX D-Format  (D.P.)      2         -128         127    1.39D-17
-C  VAX G-Format  (D.P.)      2        -1024        1023    1.11D-16
-C
-C
-C                         SQXMIN       XINF        XMIN      XMAX
-C
-C CRAY-1        (S.P.)  6.77E-1234  5.45E+2465  4.59E-2467 5674.858
-C Cyber 180/855
-C   under NOS   (S.P.)  1.77E-147   1.26E+322   3.14E-294   672.788
-C IEEE (IBM/XT,
-C   SUN, etc.)  (S.P.)  1.08E-19    3.40E+38    1.18E-38     85.337
-C IEEE (IBM/XT,
-C   SUN, etc.)  (D.P.)  1.49D-154   1.79D+308   2.23D-308   705.342
-C IBM 3033      (D.P.)  7.35D-40    7.23D+75    5.40D-79    177.852
-C VAX           (S.P.)  5.42E-20    1.70E+38    2.94E-39     86.715
-C VAX D-Format  (D.P.)  5.42D-20    1.70D+38    2.94D-39     86.715
-C VAX G-Format  (D.P.)  7.46D-155   8.98D+307   5.57D-309   706.728
-C
-C*******************************************************************
-C*******************************************************************
-C
-C Error returns
-C
-C  In case of an error, NCALC .NE. NB, and not all K's are
-C  calculated to the desired accuracy.
-C
-C  NCALC .LT. -1:  An argument is out of range. For example,
-C       NB .LE. 0, IZE is not 1 or 2, or IZE=1 and ABS(X) .GE.
-C       XMAX.  In this case, the B-vector is not calculated,
-C       and NCALC is set to MIN0(NB,0)-2  so that NCALC .NE. NB.
-C  NCALC = -1:  Either  K(ALPHA,X) .GE. XINF  or
-C       K(ALPHA+NB-1,X)/K(ALPHA+NB-2,X) .GE. XINF.  In this case,
-C       the B-vector is not calculated.  Note that again 
-C       NCALC .NE. NB.
-C
-C  0 .LT. NCALC .LT. NB: Not all requested function values could
-C       be calculated accurately.  BK(I) contains correct function
-C       values for I .LE. NCALC, and contains the ratios
-C       K(ALPHA+I-1,X)/K(ALPHA+I-2,X) for the rest of the array.
-C
-C
-C Intrinsic functions required are:
-C
-C     ABS, AINT, EXP, INT, LOG, MAX, MIN, SINH, SQRT
-C
-C
-C Acknowledgement
-C
-C  This program is based on a program written by J. B. Campbell
-C  (2) that computes values of the Bessel functions K of real
-C  argument and real order.  Modifications include the addition
-C  of non-scaled functions, parameterization of machine
-C  dependencies, and the use of more accurate approximations
-C  for SINH and SIN.
-C
-C References: "On Temme's Algorithm for the Modified Bessel
-C              Functions of the Third Kind," Campbell, J. B.,
-C              TOMS 6(4), Dec. 1980, pp. 581-586.
-C
-C             "A FORTRAN IV Subroutine for the Modified Bessel
-C              Functions of the Third Kind of Real Order and Real
-C              Argument," Campbell, J. B., Report NRC/ERB-925,
-C              National Research Council, Canada.
-C
-C  Latest modification: May 30, 1989
-C
-C  Modified by: W. J. Cody and L. Stoltz
-C               Applied Mathematics Division
-C               Argonne National Laboratory
-C               Argonne, IL  60439
-C
-C-------------------------------------------------------------------
-      INTEGER I,IEND,ITEMP,IZE,J,K,M,MPLUS1,NB,NCALC
-CS    REAL
-      DOUBLE PRECISION  
-     1    A,ALPHA,BLPHA,BK,BK1,BK2,C,D,DM,D1,D2,D3,ENU,EPS,ESTF,ESTM,
-     2    EX,FOUR,F0,F1,F2,HALF,ONE,P,P0,Q,Q0,R,RATIO,S,SQXMIN,T,TINYX,
-     3    TWO,TWONU,TWOX,T1,T2,WMINF,X,XINF,XMAX,XMIN,X2BY4,ZERO
-      DIMENSION BK(1),P(8),Q(7),R(5),S(4),T(6),ESTM(6),ESTF(7)
-C---------------------------------------------------------------------
-C  Mathematical constants
-C    A = LOG(2.D0) - Euler's constant
-C    D = SQRT(2.D0/PI)
-C---------------------------------------------------------------------
-CS    DATA HALF,ONE,TWO,ZERO/0.5E0,1.0E0,2.0E0,0.0E0/
-CS    DATA FOUR,TINYX/4.0E0,1.0E-10/
-CS    DATA A/ 0.11593151565841244881E0/,D/0.797884560802865364E0/
-      DATA HALF,ONE,TWO,ZERO/0.5D0,1.0D0,2.0D0,0.0D0/
-      DATA FOUR,TINYX/4.0D0,1.0D-10/
-      DATA A/ 0.11593151565841244881D0/,D/0.797884560802865364D0/
-C---------------------------------------------------------------------
-C  Machine dependent parameters
-C---------------------------------------------------------------------
-CS    DATA EPS/1.19E-7/,SQXMIN/1.08E-19/,XINF/3.40E+38/
-CS    DATA XMIN/1.18E-38/,XMAX/85.337E0/
-      DATA EPS/2.22D-16/,SQXMIN/1.49D-154/,XINF/1.79D+308/
-      DATA XMIN/2.23D-308/,XMAX/705.342D0/
-C---------------------------------------------------------------------
-C  P, Q - Approximation for LOG(GAMMA(1+ALPHA))/ALPHA
-C                                         + Euler's constant
-C         Coefficients converted from hex to decimal and modified
-C         by W. J. Cody, 2/26/82
-C  R, S - Approximation for (1-ALPHA*PI/SIN(ALPHA*PI))/(2.D0*ALPHA)
-C  T    - Approximation for SINH(Y)/Y
-C---------------------------------------------------------------------
-CS    DATA P/ 0.805629875690432845E00,    0.204045500205365151E02,
-CS   1        0.157705605106676174E03,    0.536671116469207504E03,
-CS   2        0.900382759291288778E03,    0.730923886650660393E03,
-CS   3        0.229299301509425145E03,    0.822467033424113231E00/
-CS    DATA Q/ 0.294601986247850434E02,    0.277577868510221208E03,
-CS   1        0.120670325591027438E04,    0.276291444159791519E04,
-CS   2        0.344374050506564618E04,    0.221063190113378647E04,
-CS   3        0.572267338359892221E03/
-CS    DATA R/-0.48672575865218401848E+0,  0.13079485869097804016E+2,
-CS   1       -0.10196490580880537526E+3,  0.34765409106507813131E+3,
-CS   2        0.34958981245219347820E-3/
-CS    DATA S/-0.25579105509976461286E+2,  0.21257260432226544008E+3,
-CS   1       -0.61069018684944109624E+3,  0.42269668805777760407E+3/
-CS    DATA T/ 0.16125990452916363814E-9, 0.25051878502858255354E-7,
-CS   1        0.27557319615147964774E-5, 0.19841269840928373686E-3,
-CS   2        0.83333333333334751799E-2, 0.16666666666666666446E+0/
-CS    DATA ESTM/5.20583E1, 5.7607E0, 2.7782E0, 1.44303E1, 1.853004E2,
-CS   1          9.3715E0/
-CS    DATA ESTF/4.18341E1, 7.1075E0, 6.4306E0, 4.25110E1, 1.35633E0,
-CS   1          8.45096E1, 2.0E1/
-      DATA P/ 0.805629875690432845D00,    0.204045500205365151D02,
-     1        0.157705605106676174D03,    0.536671116469207504D03,
-     2        0.900382759291288778D03,    0.730923886650660393D03,
-     3        0.229299301509425145D03,    0.822467033424113231D00/
-      DATA Q/ 0.294601986247850434D02,    0.277577868510221208D03,
-     1        0.120670325591027438D04,    0.276291444159791519D04,
-     2        0.344374050506564618D04,    0.221063190113378647D04,
-     3        0.572267338359892221D03/
-      DATA R/-0.48672575865218401848D+0,  0.13079485869097804016D+2,
-     1       -0.10196490580880537526D+3,  0.34765409106507813131D+3,
-     2        0.34958981245219347820D-3/
-      DATA S/-0.25579105509976461286D+2,  0.21257260432226544008D+3,
-     1       -0.61069018684944109624D+3,  0.42269668805777760407D+3/
-      DATA T/ 0.16125990452916363814D-9, 0.25051878502858255354D-7,
-     1        0.27557319615147964774D-5, 0.19841269840928373686D-3,
-     2        0.83333333333334751799D-2, 0.16666666666666666446D+0/
-      DATA ESTM/5.20583D1, 5.7607D0, 2.7782D0, 1.44303D1, 1.853004D2,
-     1          9.3715D0/
-      DATA ESTF/4.18341D1, 7.1075D0, 6.4306D0, 4.25110D1, 1.35633D0,
-     1          8.45096D1, 2.0D1/
-C---------------------------------------------------------------------
-      EX = X
-      ENU = ALPHA
-      NCALC = MIN(NB,0)-2
-      IF ((NB .GT. 0) .AND. ((ENU .GE. ZERO) .AND. (ENU .LT. ONE))
-     1     .AND. ((IZE .GE. 1) .AND. (IZE .LE. 2)) .AND.
-     2     ((IZE .NE. 1) .OR. (EX .LE. XMAX)) .AND.
-     3     (EX .GT. ZERO))  THEN
-            K = 0
-            IF (ENU .LT. SQXMIN) ENU = ZERO
-            IF (ENU .GT. HALF) THEN
-                  K = 1
-                  ENU = ENU - ONE
-            END IF
-            TWONU = ENU+ENU
-            IEND = NB+K-1
-            C = ENU*ENU
-            D3 = -C
-            IF (EX .LE. ONE) THEN
-C---------------------------------------------------------------------
-C  Calculation of P0 = GAMMA(1+ALPHA) * (2/X)**ALPHA
-C                 Q0 = GAMMA(1-ALPHA) * (X/2)**ALPHA
-C---------------------------------------------------------------------
-                  D1 = ZERO
-                  D2 = P(1)
-                  T1 = ONE
-                  T2 = Q(1)
-                  DO 10 I = 2,7,2
-                     D1 = C*D1+P(I)
-                     D2 = C*D2+P(I+1)
-                     T1 = C*T1+Q(I)
-                     T2 = C*T2+Q(I+1)
-   10             CONTINUE
-                  D1 = ENU*D1
-                  T1 = ENU*T1
-                  F1 = LOG(EX)
-                  F0 = A+ENU*(P(8)-ENU*(D1+D2)/(T1+T2))-F1
-                  Q0 = EXP(-ENU*(A-ENU*(P(8)+ENU*(D1-D2)/(T1-T2))-F1))
-                  F1 = ENU*F0
-                  P0 = EXP(F1)
-C---------------------------------------------------------------------
-C  Calculation of F0 = 
-C---------------------------------------------------------------------
-                  D1 = R(5)
-                  T1 = ONE
-                  DO 20 I = 1,4
-                     D1 = C*D1+R(I)
-                     T1 = C*T1+S(I)
-   20             CONTINUE
-                  IF (ABS(F1) .LE. HALF) THEN
-                        F1 = F1*F1
-                        D2 = ZERO
-                        DO 30 I = 1,6
-                           D2 = F1*D2+T(I)
-   30                   CONTINUE
-                        D2 = F0+F0*F1*D2
-                     ELSE
-                        D2 = SINH(F1)/ENU
-                  END IF
-                  F0 = D2-ENU*D1/(T1*P0)
-                  IF (EX .LE. TINYX) THEN
-C--------------------------------------------------------------------
-C  X.LE.1.0E-10
-C  Calculation of K(ALPHA,X) and X*K(ALPHA+1,X)/K(ALPHA,X)
-C--------------------------------------------------------------------
-                        BK(1) = F0+EX*F0
-                        IF (IZE .EQ. 1) BK(1) = BK(1)-EX*BK(1)
-                        RATIO = P0/F0
-                        C = EX*XINF
-                        IF (K .NE. 0) THEN
-C--------------------------------------------------------------------
-C  Calculation of K(ALPHA,X) and X*K(ALPHA+1,X)/K(ALPHA,X),
-C  ALPHA .GE. 1/2
-C--------------------------------------------------------------------
-                              NCALC = -1
-                              IF (BK(1) .GE. C/RATIO) GO TO 500
-                              BK(1) = RATIO*BK(1)/EX
-                              TWONU = TWONU+TWO
-                              RATIO = TWONU
-                        END IF
-                        NCALC = 1
-                        IF (NB .EQ. 1) GO TO 500
-C--------------------------------------------------------------------
-C  Calculate  K(ALPHA+L,X)/K(ALPHA+L-1,X),  L  =  1, 2, ... , NB-1
-C--------------------------------------------------------------------
-                        NCALC = -1
-                        DO 80 I = 2,NB
-                           IF (RATIO .GE. C) GO TO 500
-                           BK(I) = RATIO/EX
-                           TWONU = TWONU+TWO
-                           RATIO = TWONU
-   80                   CONTINUE
-                        NCALC = 1
-                        GO TO 420
-                     ELSE
-C--------------------------------------------------------------------
-C  1.0E-10 .LT. X .LE. 1.0
-C--------------------------------------------------------------------
-                        C = ONE
-                        X2BY4 = EX*EX/FOUR
-                        P0 = HALF*P0
-                        Q0 = HALF*Q0
-                        D1 = -ONE
-                        D2 = ZERO
-                        BK1 = ZERO
-                        BK2 = ZERO
-                        F1 = F0
-                        F2 = P0
-  100                   D1 = D1+TWO
-                        D2 = D2+ONE
-                        D3 = D1+D3
-                        C = X2BY4*C/D2
-                        F0 = (D2*F0+P0+Q0)/D3
-                        P0 = P0/(D2-ENU)
-                        Q0 = Q0/(D2+ENU)
-                        T1 = C*F0
-                        T2 = C*(P0-D2*F0)
-                        BK1 = BK1+T1
-                        BK2 = BK2+T2
-                        IF ((ABS(T1/(F1+BK1)) .GT. EPS) .OR.
-     1                     (ABS(T2/(F2+BK2)) .GT. EPS))  GO TO 100
-                        BK1 = F1+BK1
-                        BK2 = TWO*(F2+BK2)/EX
-                        IF (IZE .EQ. 2) THEN
-                              D1 = EXP(EX)
-                              BK1 = BK1*D1
-                              BK2 = BK2*D1
-                        END IF
-                        WMINF = ESTF(1)*EX+ESTF(2)
-                  END IF
-               ELSE IF (EPS*EX .GT. ONE) THEN
-C--------------------------------------------------------------------
-C  X .GT. ONE/EPS
-C--------------------------------------------------------------------
-                  NCALC = NB
-                  BK1 = ONE / (D*SQRT(EX))
-                  DO 110 I = 1, NB
-                     BK(I) = BK1
-  110             CONTINUE
-                  GO TO 500
-               ELSE
-C--------------------------------------------------------------------
-C  X .GT. 1.0
-C--------------------------------------------------------------------
-                  TWOX = EX+EX
-                  BLPHA = ZERO
-                  RATIO = ZERO
-                  IF (EX .LE. FOUR) THEN
-C--------------------------------------------------------------------
-C  Calculation of K(ALPHA+1,X)/K(ALPHA,X),  1.0 .LE. X .LE. 4.0
-C--------------------------------------------------------------------
-                        D2 = AINT(ESTM(1)/EX+ESTM(2))
-                        M = INT(D2)
-                        D1 = D2+D2
-                        D2 = D2-HALF
-                        D2 = D2*D2
-                        DO 120 I = 2,M
-                           D1 = D1-TWO
-                           D2 = D2-D1
-                           RATIO = (D3+D2)/(TWOX+D1-RATIO)
-  120                   CONTINUE
-C--------------------------------------------------------------------
-C  Calculation of I(|ALPHA|,X) and I(|ALPHA|+1,X) by backward
-C    recurrence and K(ALPHA,X) from the wronskian
-C--------------------------------------------------------------------
-                        D2 = AINT(ESTM(3)*EX+ESTM(4))
-                        M = INT(D2)
-                        C = ABS(ENU)
-                        D3 = C+C
-                        D1 = D3-ONE
-                        F1 = XMIN
-                        F0 = (TWO*(C+D2)/EX+HALF*EX/(C+D2+ONE))*XMIN
-                        DO 130 I = 3,M
-                           D2 = D2-ONE
-                           F2 = (D3+D2+D2)*F0
-                           BLPHA = (ONE+D1/D2)*(F2+BLPHA)
-                           F2 = F2/EX+F1
-                           F1 = F0
-                           F0 = F2
-  130                   CONTINUE
-                        F1 = (D3+TWO)*F0/EX+F1
-                        D1 = ZERO
-                        T1 = ONE
-                        DO 140 I = 1,7
-                           D1 = C*D1+P(I)
-                           T1 = C*T1+Q(I)
-  140                   CONTINUE
-                        P0 = EXP(C*(A+C*(P(8)-C*D1/T1)-LOG(EX)))/EX
-                        F2 = (C+HALF-RATIO)*F1/EX
-                        BK1 = P0+(D3*F0-F2+F0+BLPHA)/(F2+F1+F0)*P0
-                        IF (IZE .EQ. 1) BK1 = BK1*EXP(-EX)
-                        WMINF = ESTF(3)*EX+ESTF(4)
-                     ELSE
-C--------------------------------------------------------------------
-C  Calculation of K(ALPHA,X) and K(ALPHA+1,X)/K(ALPHA,X), by backward
-C  recurrence, for  X .GT. 4.0
-C--------------------------------------------------------------------
-                        DM = AINT(ESTM(5)/EX+ESTM(6))
-                        M = INT(DM)
-                        D2 = DM-HALF
-                        D2 = D2*D2
-                        D1 = DM+DM
-                        DO 160 I = 2,M
-                           DM = DM-ONE
-                           D1 = D1-TWO
-                           D2 = D2-D1
-                           RATIO = (D3+D2)/(TWOX+D1-RATIO)
-                           BLPHA = (RATIO+RATIO*BLPHA)/DM
-  160                   CONTINUE
-                        BK1 = ONE/((D+D*BLPHA)*SQRT(EX))
-                        IF (IZE .EQ. 1) BK1 = BK1*EXP(-EX)
-                        WMINF = ESTF(5)*(EX-ABS(EX-ESTF(7)))+ESTF(6)
-                  END IF
-C--------------------------------------------------------------------
-C  Calculation of K(ALPHA+1,X) from K(ALPHA,X) and
-C    K(ALPHA+1,X)/K(ALPHA,X)
-C--------------------------------------------------------------------
-                  BK2 = BK1+BK1*(ENU+HALF-RATIO)/EX
-            END IF
-C--------------------------------------------------------------------
-C  Calculation of 'NCALC', K(ALPHA+I,X), I  =  0, 1, ... , NCALC-1,
-C  K(ALPHA+I,X)/K(ALPHA+I-1,X), I  =  NCALC, NCALC+1, ... , NB-1
-C--------------------------------------------------------------------
-            NCALC = NB
-            BK(1) = BK1
-            IF (IEND .EQ. 0) GO TO 500
-            J = 2-K
-            IF (J .GT. 0) BK(J) = BK2
-            IF (IEND .EQ. 1) GO TO 500
-            M = MIN(INT(WMINF-ENU),IEND)
-            DO 190 I = 2,M
-               T1 = BK1
-               BK1 = BK2
-               TWONU = TWONU+TWO
-               IF (EX .LT. ONE) THEN
-                     IF (BK1 .GE. (XINF/TWONU)*EX) GO TO 195
-                     GO TO 187
-                  ELSE 
-                     IF (BK1/EX .GE. XINF/TWONU) GO TO 195
-               END IF
-  187          CONTINUE
-               BK2 = TWONU/EX*BK1+T1
-               ITEMP = I
-               J = J+1
-               IF (J .GT. 0) BK(J) = BK2
-  190       CONTINUE
-  195       M = ITEMP
-            IF (M .EQ. IEND) GO TO 500
-            RATIO = BK2/BK1
-            MPLUS1 = M+1
-            NCALC = -1
-            DO 410 I = MPLUS1,IEND
-               TWONU = TWONU+TWO
-               RATIO = TWONU/EX+ONE/RATIO
-               J = J+1
-               IF (J .GT. 1) THEN
-                     BK(J) = RATIO
-                  ELSE
-                     IF (BK2 .GE. XINF/RATIO) GO TO 500
-                     BK2 = RATIO*BK2
-               END IF
-  410       CONTINUE
-            NCALC = MAX(MPLUS1-K,1)
-            IF (NCALC .EQ. 1) BK(1) = BK2
-            IF (NB .EQ. 1) GO TO 500
-  420       J = NCALC+1
-            DO 430 I = J,NB
-               IF (BK(NCALC) .GE. XINF/BK(I)) GO TO 500
-               BK(I) = BK(NCALC)*BK(I)
-               NCALC = I
-  430       CONTINUE
-      END IF
-  500 RETURN
-C---------- Last line of RKBESL ----------
-      END
diff --git a/scilab/modules/elementary_functions/src/fortran/rybesl.f b/scilab/modules/elementary_functions/src/fortran/rybesl.f
deleted file mode 100644 (file)
index 398c08e..0000000
+++ /dev/null
@@ -1,444 +0,0 @@
-      SUBROUTINE RYBESL(X,ALPHA,NB,BY,NCALC)
-C----------------------------------------------------------------------
-C
-C  This routine calculates Bessel functions Y SUB(N+ALPHA) (X)
-C  for non-negative argument X, and non-negative order N+ALPHA.
-C
-C
-C Explanation of variables in the calling sequence
-C
-C X     - Working precision non-negative real argument for which
-C         Y's are to be calculated.
-C ALPHA - Working precision fractional part of order for which
-C         Y's are to be calculated.  0 .LE. ALPHA .LT. 1.0.
-C NB    - Integer number of functions to be calculated, NB .GT. 0.
-C         The first function calculated is of order ALPHA, and the 
-C         last is of order (NB - 1 + ALPHA).
-C BY    - Working precision output vector of length NB.  If the
-C         routine terminates normally (NCALC=NB), the vector BY
-C         contains the functions Y(ALPHA,X), ... , Y(NB-1+ALPHA,X),
-C         If (0 .LT. NCALC .LT. NB), BY(I) contains correct function
-C         values for I .LE. NCALC, and contains the ratios
-C         Y(ALPHA+I-1,X)/Y(ALPHA+I-2,X) for the rest of the array.
-C NCALC - Integer output variable indicating possible errors.
-C         Before using the vector BY, the user should check that 
-C         NCALC=NB, i.e., all orders have been calculated to
-C         the desired accuracy.  See error returns below.
-C
-C
-C*******************************************************************
-C*******************************************************************
-C
-C Explanation of machine-dependent constants
-C
-C   beta   = Radix for the floating-point system
-C   p      = Number of significant base-beta digits in the
-C            significand of a floating-point number
-C   minexp = Smallest representable power of beta
-C   maxexp = Smallest power of beta that overflows
-C   EPS    = beta ** (-p)
-C   DEL    = Machine number below which sin(x)/x = 1; approximately
-C            SQRT(EPS).
-C   XMIN   = Smallest acceptable argument for RBESY; approximately
-C            max(2*beta**minexp,2/XINF), rounded up
-C   XINF   = Largest positive machine number; approximately
-C            beta**maxexp
-C   THRESH = Lower bound for use of the asymptotic form; approximately
-C            AINT(-LOG10(EPS/2.0))+1.0
-C   XLARGE = Upper bound on X; approximately 1/DEL, because the sine
-C            and cosine functions have lost about half of their 
-C            precision at that point.
-C
-C
-C     Approximate values for some important machines are:
-C
-C                        beta    p     minexp      maxexp      EPS
-C
-C  CRAY-1        (S.P.)    2    48     -8193        8191    3.55E-15
-C  Cyber 180/185 
-C    under NOS   (S.P.)    2    48      -975        1070    3.55E-15
-C  IEEE (IBM/XT,
-C    SUN, etc.)  (S.P.)    2    24      -126         128    5.96E-8
-C  IEEE (IBM/XT,
-C    SUN, etc.)  (D.P.)    2    53     -1022        1024    1.11D-16
-C  IBM 3033      (D.P.)   16    14       -65          63    1.39D-17
-C  VAX           (S.P.)    2    24      -128         127    5.96E-8
-C  VAX D-Format  (D.P.)    2    56      -128         127    1.39D-17
-C  VAX G-Format  (D.P.)    2    53     -1024        1023    1.11D-16
-C
-C
-C                         DEL      XMIN      XINF     THRESH  XLARGE
-C
-C CRAY-1        (S.P.)  5.0E-8  3.67E-2466 5.45E+2465  15.0E0  2.0E7
-C Cyber 180/855
-C   under NOS   (S.P.)  5.0E-8  6.28E-294  1.26E+322   15.0E0  2.0E7
-C IEEE (IBM/XT,
-C   SUN, etc.)  (S.P.)  1.0E-4  2.36E-38   3.40E+38     8.0E0  1.0E4
-C IEEE (IBM/XT,
-C   SUN, etc.)  (D.P.)  1.0D-8  4.46D-308  1.79D+308   16.0D0  1.0D8
-C IBM 3033      (D.P.)  1.0D-8  2.77D-76   7.23D+75    17.0D0  1.0D8
-C VAX           (S.P.)  1.0E-4  1.18E-38   1.70E+38     8.0E0  1.0E4
-C VAX D-Format  (D.P.)  1.0D-9  1.18D-38   1.70D+38    17.0D0  1.0D9
-C VAX G-Format  (D.P.)  1.0D-8  2.23D-308  8.98D+307   16.0D0  1.0D8
-C
-C*******************************************************************
-C*******************************************************************
-C
-C Error returns
-C
-C  In case of an error, NCALC .NE. NB, and not all Y's are
-C  calculated to the desired accuracy.
-C
-C  NCALC .LT. -1:  An argument is out of range. For example,
-C       NB .LE. 0, IZE is not 1 or 2, or IZE=1 and ABS(X) .GE.
-C       XMAX.  In this case, BY(1) = 0.0, the remainder of the
-C       BY-vector is not calculated, and NCALC is set to
-C       MIN0(NB,0)-2  so that NCALC .NE. NB.
-C  NCALC = -1:  Y(ALPHA,X) .GE. XINF.  The requested function
-C       values are set to 0.0.
-C  1 .LT. NCALC .LT. NB: Not all requested function values could
-C       be calculated accurately.  BY(I) contains correct function
-C       values for I .LE. NCALC, and and the remaining NB-NCALC
-C       array elements contain 0.0.
-C
-C
-C Intrinsic functions required are:
-C
-C     DBLE, EXP, INT, MAX, MIN, REAL, SQRT
-C
-C
-C Acknowledgement
-C
-C  This program draws heavily on Temme's Algol program for Y(a,x)
-C  and Y(a+1,x) and on Campbell's programs for Y_nu(x).  Temme's
-C  scheme is used for  x < THRESH, and Campbell's scheme is used
-C  in the asymptotic region.  Segments of code from both sources
-C  have been translated into Fortran 77, merged, and heavily modified.
-C  Modifications include parameterization of machine dependencies,
-C  use of a new approximation for ln(gamma(x)), and built-in
-C  protection against over/underflow.
-C
-C References: "Bessel functions J_nu(x) and Y_nu(x) of real
-C              order and real argument," Campbell, J. B.,
-C              Comp. Phy. Comm. 18, 1979, pp. 133-142.
-C
-C             "On the numerical evaluation of the ordinary
-C              Bessel function of the second kind," Temme,
-C              N. M., J. Comput. Phys. 21, 1976, pp. 343-350.
-C
-C  Latest modification: March 19, 1990
-C
-C  Modified by: W. J. Cody
-C               Applied Mathematics Division
-C               Argonne National Laboratory
-C               Argonne, IL  60439
-C
-C----------------------------------------------------------------------
-      INTEGER I,K,NA,NB,NCALC
-CS    REAL
-      DOUBLE PRECISION
-     1  ALFA,ALPHA,AYE,B,BY,C,CH,COSMU,D,DEL,DEN,DDIV,DIV,DMU,D1,D2,
-     2  E,EIGHT,EN,ENU,EN1,EPS,EVEN,EX,F,FIVPI,G,GAMMA,H,HALF,ODD,
-     3  ONBPI,ONE,ONE5,P,PA,PA1,PI,PIBY2,PIM5,Q,QA,QA1,Q0,R,S,SINMU,
-     4  SQ2BPI,TEN9,TERM,THREE,THRESH,TWO,TWOBYX,X,XINF,XLARGE,XMIN,
-     5  XNA,X2,YA,YA1,ZERO
-      DIMENSION BY(NB),CH(21)
-C----------------------------------------------------------------------
-C  Mathematical constants
-C    FIVPI = 5*PI
-C    PIM5 = 5*PI - 15
-C    ONBPI = 1/PI
-C    PIBY2 = PI/2
-C    SQ2BPI = SQUARE ROOT OF 2/PI
-C----------------------------------------------------------------------
-CS    DATA ZERO,HALF,ONE,TWO,THREE/0.0E0,0.5E0,1.0E0,2.0E0,3.0E0/
-CS    DATA EIGHT,ONE5,TEN9/8.0E0,15.0E0,1.9E1/
-CS    DATA FIVPI,PIBY2/1.5707963267948966192E1,1.5707963267948966192E0/
-CS    DATA PI,SQ2BPI/3.1415926535897932385E0,7.9788456080286535588E-1/
-CS    DATA PIM5,ONBPI/7.0796326794896619231E-1,3.1830988618379067154E-1/
-      DATA ZERO,HALF,ONE,TWO,THREE/0.0D0,0.5D0,1.0D0,2.0D0,3.0D0/
-      DATA EIGHT,ONE5,TEN9/8.0D0,15.0D0,1.9D1/
-      DATA FIVPI,PIBY2/1.5707963267948966192D1,1.5707963267948966192D0/
-      DATA PI,SQ2BPI/3.1415926535897932385D0,7.9788456080286535588D-1/
-      DATA PIM5,ONBPI/7.0796326794896619231D-1,3.1830988618379067154D-1/
-C----------------------------------------------------------------------
-C  Machine-dependent constants
-C----------------------------------------------------------------------
-CS    DATA DEL,XMIN,XINF,EPS/1.0E-4,2.36E-38,3.40E38,5.96E-8/
-CS    DATA THRESH,XLARGE/8.0E0,1.0E4/
-      DATA DEL,XMIN,XINF,EPS/1.0D-8,4.46D-308,1.79D308,1.11D-16/
-      DATA THRESH,XLARGE/16.0D0,1.0D8/
-C----------------------------------------------------------------------
-C  Coefficients for Chebyshev polynomial expansion of 
-C         1/gamma(1-x), abs(x) .le. .5
-C----------------------------------------------------------------------
-CS    DATA CH/-0.67735241822398840964E-23,-0.61455180116049879894E-22,
-CS   1         0.29017595056104745456E-20, 0.13639417919073099464E-18,
-CS   2         0.23826220476859635824E-17,-0.90642907957550702534E-17,
-CS   3        -0.14943667065169001769E-14,-0.33919078305362211264E-13,
-CS   4        -0.17023776642512729175E-12, 0.91609750938768647911E-11,
-CS   5         0.24230957900482704055E-09, 0.17451364971382984243E-08,
-CS   6        -0.33126119768180852711E-07,-0.86592079961391259661E-06,
-CS   7        -0.49717367041957398581E-05, 0.76309597585908126618E-04,
-CS   8         0.12719271366545622927E-02, 0.17063050710955562222E-02,
-CS   9        -0.76852840844786673690E-01,-0.28387654227602353814E+00,
-CS   A         0.92187029365045265648E+00/
-      DATA CH/-0.67735241822398840964D-23,-0.61455180116049879894D-22,
-     1         0.29017595056104745456D-20, 0.13639417919073099464D-18,
-     2         0.23826220476859635824D-17,-0.90642907957550702534D-17,
-     3        -0.14943667065169001769D-14,-0.33919078305362211264D-13,
-     4        -0.17023776642512729175D-12, 0.91609750938768647911D-11,
-     5         0.24230957900482704055D-09, 0.17451364971382984243D-08,
-     6        -0.33126119768180852711D-07,-0.86592079961391259661D-06,
-     7        -0.49717367041957398581D-05, 0.76309597585908126618D-04,
-     8         0.12719271366545622927D-02, 0.17063050710955562222D-02,
-     9        -0.76852840844786673690D-01,-0.28387654227602353814D+00,
-     A         0.92187029365045265648D+00/
-C----------------------------------------------------------------------
-      EX = X
-      ENU = ALPHA
-      IF ((NB .GT. 0) .AND. (X .GE. XMIN) .AND. (EX .LT. XLARGE)
-     1       .AND. (ENU .GE. ZERO) .AND. (ENU .LT. ONE))  THEN
-            XNA = AINT(ENU+HALF)
-            NA = INT(XNA)
-            IF (NA .EQ. 1) ENU = ENU - XNA
-            IF (ENU .EQ. -HALF) THEN
-                  P = SQ2BPI/SQRT(EX)
-                  YA = P * SIN(EX)
-                  YA1 = -P * COS(EX)
-               ELSE IF (EX .LT. THREE) THEN
-C----------------------------------------------------------------------
-C  Use Temme's scheme for small X
-C----------------------------------------------------------------------
-                  B = EX * HALF
-                  D = -LOG(B)
-                  F = ENU * D
-                  E = B**(-ENU)
-                  IF (ABS(ENU) .LT. DEL) THEN
-                        C = ONBPI
-                     ELSE
-                        C = ENU / SIN(ENU*PI)
-                  END IF
-C----------------------------------------------------------------------
-C  Computation of sinh(f)/f
-C----------------------------------------------------------------------
-                  IF (ABS(F) .LT. ONE) THEN
-                        X2 = F*F
-                        EN = TEN9
-                        S = ONE
-                        DO 80 I = 1, 9
-                           S = S*X2/EN/(EN-ONE)+ONE
-                           EN = EN - TWO
-   80                   CONTINUE
-                     ELSE 
-                        S = (E - ONE/E) * HALF / F
-                  END IF
-C----------------------------------------------------------------------
-C  Computation of 1/gamma(1-a) using Chebyshev polynomials
-C----------------------------------------------------------------------
-                  X2 = ENU*ENU*EIGHT
-                  AYE = CH(1)
-                  EVEN = ZERO
-                  ALFA = CH(2)
-                  ODD = ZERO
-                  DO 40 I = 3, 19, 2
-                     EVEN = -(AYE+AYE+EVEN)
-                     AYE = -EVEN*X2 - AYE + CH(I)
-                     ODD = -(ALFA+ALFA+ODD)
-                     ALFA = -ODD*X2 - ALFA + CH(I+1)
-   40             CONTINUE
-                  EVEN = (EVEN*HALF+AYE)*X2 - AYE + CH(21)
-                  ODD = (ODD+ALFA)*TWO
-                  GAMMA = ODD*ENU + EVEN
-C----------------------------------------------------------------------
-C  End of computation of 1/gamma(1-a)
-C----------------------------------------------------------------------
-                  G = E * GAMMA
-                  E = (E + ONE/E) * HALF
-                  F = TWO*C*(ODD*E+EVEN*S*D)
-                  E = ENU*ENU
-                  P = G*C
-                  Q = ONBPI / G
-                  C = ENU*PIBY2
-                  IF (ABS(C) .LT. DEL) THEN
-                        R = ONE
-                     ELSE 
-                        R = SIN(C)/C
-                  END IF
-                  R = PI*C*R*R
-                  C = ONE
-                  D = - B*B
-                  H = ZERO
-                  YA = F + R*Q
-                  YA1 = P
-                  EN = ZERO
-  100             EN = EN + ONE
-                  IF (ABS(G/(ONE+ABS(YA)))
-     1                      + ABS(H/(ONE+ABS(YA1))) .GT. EPS) THEN
-                        F = (F*EN+P+Q)/(EN*EN-E)
-                        C = C * D/EN
-                        P = P/(EN-ENU)
-                        Q = Q/(EN+ENU)
-                        G = C*(F+R*Q)
-                        H = C*P - EN*G
-                        YA = YA + G
-                        YA1 = YA1+H
-                        GO TO 100
-                  END IF
-                  YA = -YA
-                  YA1 = -YA1/B
-               ELSE IF (EX .LT. THRESH) THEN
-C----------------------------------------------------------------------
-C  Use Temme's scheme for moderate X
-C----------------------------------------------------------------------
-                  C = (HALF-ENU)*(HALF+ENU)
-                  B = EX + EX
-                  E = (EX*ONBPI*COS(ENU*PI)/EPS)
-                  E = E*E
-                  P = ONE
-                  Q = -EX
-                  R = ONE + EX*EX
-                  S = R
-                  EN = TWO
-  200             IF (R*EN*EN .LT. E) THEN
-                        EN1 = EN+ONE
-                        D = (EN-ONE+C/EN)/S
-                        P = (EN+EN-P*D)/EN1
-                        Q = (-B+Q*D)/EN1
-                        S = P*P + Q*Q
-                        R = R*S
-                        EN = EN1
-                        GO TO 200
-                  END IF
-                  F = P/S
-                  P = F
-                  G = -Q/S
-                  Q = G
-  220             EN = EN - ONE  
-                  IF (EN .GT. ZERO) THEN
-                        R = EN1*(TWO-P)-TWO
-                        S = B + EN1*Q
-                        D = (EN-ONE+C/EN)/(R*R+S*S)
-                        P = D*R
-                        Q = D*S
-                        E = F + ONE
-                        F = P*E - G*Q
-                        G = Q*E + P*G
-                        EN1 = EN
-                        GO TO 220
-                  END IF
-                  F = ONE + F
-                  D = F*F + G*G
-                  PA = F/D
-                  QA = -G/D
-                  D = ENU + HALF -P
-                  Q = Q + EX
-                  PA1 = (PA*Q-QA*D)/EX
-                  QA1 = (QA*Q+PA*D)/EX
-                  B = EX - PIBY2*(ENU+HALF)
-                  C = COS(B)
-                  S = SIN(B)
-                  D = SQ2BPI/SQRT(EX)
-                  YA = D*(PA*S+QA*C)
-                  YA1 = D*(QA1*S-PA1*C)
-               ELSE
-C----------------------------------------------------------------------
-C  Use Campbell's asymptotic scheme.
-C----------------------------------------------------------------------
-                  NA = 0
-                  D1 = AINT(EX/FIVPI)
-                  I = INT(D1)
-                  DMU = ((EX-ONE5*D1)-D1*PIM5)-(ALPHA+HALF)*PIBY2
-                  IF (I-2*(I/2) .EQ. 0) THEN
-                        COSMU = COS(DMU)
-                        SINMU = SIN(DMU)
-                     ELSE
-                        COSMU = -COS(DMU)
-                        SINMU = -SIN(DMU)
-                  END IF
-                  DDIV = EIGHT * EX
-                  DMU = ALPHA
-                  DEN = SQRT(EX)
-                  DO 350 K = 1, 2
-                     P = COSMU
-                     COSMU = SINMU
-                     SINMU = -P
-                     D1 = (TWO*DMU-ONE)*(TWO*DMU+ONE)
-                     D2 = ZERO
-                     DIV = DDIV
-                     P = ZERO
-                     Q = ZERO
-                     Q0 = D1/DIV
-                     TERM = Q0
-                     DO 310 I = 2, 20
-                        D2 = D2 + EIGHT
-                        D1 = D1 - D2
-                        DIV = DIV + DDIV
-                        TERM = -TERM*D1/DIV
-                        P = P + TERM
-                        D2 = D2 + EIGHT
-                        D1 = D1 - D2
-                        DIV = DIV + DDIV
-                        TERM = TERM*D1/DIV
-                        Q = Q + TERM
-                        IF (ABS(TERM) .LE. EPS) GO TO 320
-  310                CONTINUE
-  320                P = P + ONE
-                     Q = Q + Q0
-                     IF (K .EQ. 1) THEN
-                           YA = SQ2BPI * (P*COSMU-Q*SINMU) / DEN
-                        ELSE
-                           YA1 = SQ2BPI * (P*COSMU-Q*SINMU) / DEN
-                     END IF
-                     DMU = DMU + ONE
-  350             CONTINUE
-            END IF
-            IF (NA .EQ. 1) THEN
-               H = TWO*(ENU+ONE)/EX
-               IF (H .GT. ONE) THEN
-                  IF (ABS(YA1) .GT. XINF/H) THEN
-                     H = ZERO
-                     YA = ZERO
-                  END IF
-               END IF
-               H = H*YA1 - YA
-               YA = YA1
-               YA1 = H
-            END IF
-C----------------------------------------------------------------------
-C  Now have first one or two Y's
-C----------------------------------------------------------------------
-            BY(1) = YA
-            BY(2) = YA1
-            IF (YA1 .EQ. ZERO) THEN
-                  NCALC = 1
-               ELSE
-                  AYE = ONE + ALPHA
-                  TWOBYX = TWO/EX
-                  NCALC = 2
-                  DO 400 I = 3, NB
-                     IF (TWOBYX .LT. ONE) THEN
-                           IF (ABS(BY(I-1))*TWOBYX .GE. XINF/AYE)
-     1                                                     GO TO 450
-                        ELSE
-                           IF (ABS(BY(I-1)) .GE. XINF/AYE/TWOBYX )
-     1                                                     GO TO 450
-                     END IF
-                     BY(I) = TWOBYX*AYE*BY(I-1) - BY(I-2) 
-                     AYE = AYE + ONE
-                     NCALC = NCALC + 1
-  400             CONTINUE
-            END IF
-  450       DO 460 I = NCALC+1, NB
-               BY(I) = ZERO
-  460       CONTINUE
-         ELSE
-            BY(1) = ZERO
-            NCALC = MIN(NB,0) - 1
-      END IF
-  900 RETURN
-C---------- Last line of RYBESL ----------
-      END
-
-
-
diff --git a/scilab/modules/elementary_functions/src/fortran/zbeshg.f b/scilab/modules/elementary_functions/src/fortran/zbeshg.f
deleted file mode 100644 (file)
index e0cec7b..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-c Copyright (C) 2005 - INRIA - Serge STEER
-c 
-c This file must be used under the terms of the CeCILL.
-c This source file is licensed as described in the file COPYING, which
-c you should have received as part of this distribution.  The terms
-c are also available at    
-c http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-c
-      subroutine zbeshg (x1r,x1i,alpha, kode, k,n, yr,yi, nz,wr,wi,ierr)
-c     Author Serge Steer, 2005
-c     extends cbesi for the case where alpha is negative
-      double precision alpha
-      double precision x1r, x1i, yr(n), yi(n), wr(n),wi(n)
-      integer kode,n,nz,ierr
-c     
-      double precision a,b,pi,inf,xr, xi,a1
-      integer ier2
-      double precision dlamch
-
-      data pi /3.14159265358979324D0/
-      inf=dlamch('o')*2.0d0   
-
-      xr=x1r
-      xi=x1i
-      ier2=0
-      if (xr.ne.xr.or.xi.ne.xi.or.alpha.ne.alpha) then
-c     .  NaN case
-         call dset(n,inf-inf,yr,1)
-         call dset(n,inf-inf,yi,1)
-         ierr=4
-      elseif (alpha .ge. 0.0d0) then
-         call zbesh(xr,xi,alpha,kode,k, n,yr,yi,nz,ierr)
-         if(ierr.eq.1.or.ierr.eq.2.or.ierr.ge.4) then
-            call dset(n,inf-inf,yr,1)
-            call dset(n,inf-inf,yi,1)
-         endif
-      else if (alpha .eq. dint(alpha)) then
-c     .  alpha <0 and integer,  
-c     .  transform to positive value of alpha         
-         if(alpha-1+n.ge.0) then 
-c     .     0 is between alpha and alpha+n
-            a1=0.0d0
-            nn=min(n,int(-alpha))
-         else
-            a1=-(alpha-1+n)
-            nn=n
-         endif
-         call zbesh(xr,xi,a1,kode,k,n,wr,wi,nz,ierr)
-         if (ierr.eq.1.or.ierr.eq.2.or.ierr.ge.4) then
-            call dset(n,inf-inf,yr,1)
-            call dset(n,inf-inf,yi,1)
-         else
-            if(n.gt.nn) then
-c     .        0 is between alpha and alpha+n
-               call dcopy(n-nn,wr,1,yr(nn+1),1)
-               call dcopy(n-nn,wi,1,yi(nn+1),1)
-               call dcopy(nn,wr(2),-1,yr,1)
-               call dcopy(nn,wi(2),-1,yi,1)
-            else
-c     .        alpha and alpha+n are negative
-               call dcopy(n,wr,-1,yr,1)
-               call dcopy(n,wi,-1,yi,1)
-            endif
-         endif
-         i0=mod(int(abs(alpha))+1,2)
-         call dscal((nn-i0+1)/2,-1.0d0,yr(1+i0),2)
-         call dscal((nn-i0+1)/2,-1.0d0,yi(1+i0),2)
-      else
-c     .  first alpha is negative non integer,
-c     .  transform to positive value of alpha       
-         if(alpha-1.0d0+n.ge.0.0d0) then 
-c     .     0 is between alpha and alpha+n
-            nn=int(-alpha)+1
-         else
-            nn=n
-         endif
-c     .  compute for negative value of alpha+k, transform problem for
-c     .  a1:a1+(nn-1) with a1 positive  a1+k =abs(alpha+nn-k)
-         a1=-(alpha-1.0d0+nn)
-         call zbesh(xr,xi,a1,kode,k,n,wr,wi,nz1,ierr)
-         nz=max(nz1,nz2)
-         if (ierr.eq.0) then
-            a=cos(a1*pi)
-            b=sin(a1*pi)
-            if (k.eq.1) then
-               call wscal(nn,a,b,wr,wi,1)
-            else
-               call wscal(nn,a,-b,wr,wi,1)
-            endif
-c     .     change sign to take into account that sin((a1+k)*pi) and cos((a1+k)*pi)
-C     .     changes sign with k
-            if (nn.ge.2) then
-               call dscal(nn/2,-1.0d0,wr(2),2)
-               call dscal(nn/2,-1.0d0,wi(2),2)
-            endif
-         elseif(ierr.eq.1.or.ierr.eq.2.or.ierr.ge.4) then
-            call dset(nn,inf-inf,wr,1)
-            call dset(nn,inf-inf,wi,1)
-         endif
-c     .  store the result in the correct order
-         call dcopy(nn,wr,-1,yr,1)
-         call dcopy(nn,wi,-1,yi,1)
-c     .  compute for positive value of alpha+k is any 
-         if (n.gt.nn) then
-            a1=1.0d0-a1
-            call zbesh(xr,xi,a1,kode,k,n-nn,yr(nn+1),yi(nn+1),nz,ier)
-            if(ier.eq.1.or.ier.eq.2.or.ier.ge.4) then
-               call dset(n-nn,inf-inf,yr(nn+1),1)
-               call dset(n-nn,inf-inf,yi(nn+1),1)
-            endif
-            ierr=max(ierr,ier)
-         endif
-      endif
-      end
-
-      subroutine zbeshv (xr,xi,nx,alpha,na, kode,k,yr,yi,wr,wi,ierr)
-c     Author Serge Steer, Copyright INRIA, 2005
-c     compute besseli function for x and alpha given by vectors
-c     w : working array of size 2*na (used only if nz>0 and alpha
-C     contains negative
-C     values
-      double precision xr(nx),xi(nx),alpha(na),yr(*),yi(*),wr(*),wi(*)
-      double precision dlamch,eps
-      integer kode,nx,na,ier
-      ierr=0
-      eps=dlamch('p')
-      if (na.lt.0) then
-c     .  element wise case x and alpha are supposed to have the same
-C     size
-         do i=1,nx
-            call  zbeshg (xr(i), xi(i), alpha(i), kode, k,1,yr(i),yi(i),
-     $           nz,wr,wi,ier)
-            ierr=max(ierr,ier)
-         enddo
-      elseif (na.eq.1) then
-         do i=1,nx
-            call  zbeshg (xr(i), xi(i), alpha(1), kode, k,1,yr(i),yi(i),
-     $           nz,wr,wi,ier)
-            ierr=max(ierr,ier)
-         enddo
-      else
-c     .  compute besselh(x(i),y(j)), i=1,nx,j=1,na
-         j0=1
- 05      n=0
- 10      n=n+1
-         j=j0+n
-         if (j.le.na.and.abs((1+alpha(j-1))-alpha(j)).le.eps) then
-            goto 10
-         endif
-         do i=1,nx
-            call zbeshg (xr(i), xi(i), alpha(j0) ,kode,k, n, wr, wi, nz,
-     $           wr(na+1),wi(na+1),ier)
-            ierr=max(ierr,ier)
-            call dcopy(n,wr,1,yr(i+(j0-1)*nx),nx)
-            call dcopy(n,wi,1,yi(i+(j0-1)*nx),nx)
-         enddo
-         j0=j
-         if (j0.le.na) goto 05
-      endif
-      end
-
-
index ce0a536..9a1452b 100644 (file)
@@ -1,9 +1,25 @@
 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 # Copyright (C) 2006 - INRIA - Sylvestre LEDRU
+# Copyright (C) 2011 - DIGITEO - Allan CORNET
 #
 # This file is distributed under the same license as the Scilab package.
 
 
+SPECIAL_FUNCTIONS_C_SOURCES = src/c/zbeshv.c
+
+# List of the cpp files
+SPECIAL_FUNCTIONS_CPP_SOURCES =
+
+SPECIAL_FUNCTIONS_FORTRAN_SOURCES = \
+src/fortran/dbesig.f \
+src/fortran/dbesjg.f \
+src/fortran/dbeskg.f \
+src/fortran/dbesyg.f \
+src/fortran/zbesig.f \
+src/fortran/zbesjg.f \
+src/fortran/zbeskg.f \
+src/fortran/zbesyg.f
+
 GATEWAY_C_SOURCES = sci_gateway/c/sci_dlgamma.c \
 sci_gateway/c/sci_bessely.c \
 sci_gateway/c/sci_beta.c \
@@ -17,30 +33,44 @@ sci_gateway/c/sci_calerf.c \
 sci_gateway/c/gw_special_functions.c \
 sci_gateway/c/sci_lgamma.c
 
-GATEWAY_FORTRAN_SOURCES = sci_gateway/fortran/sci_f_dlgamma.f \
+GATEWAY_FORTRAN_SOURCES =  sci_gateway/fortran/sci_f_dlgamma.f \
 sci_gateway/fortran/sci_f_lgamma.f \
 sci_gateway/fortran/sci_f_gamma.f \
 sci_gateway/fortran/sci_f_calerf.f
 
-libscispecial_functions_la_includedir=$(pkgincludedir)
+# Includes need for the compilation
+libscispecial_functions_la_FFLAGS= -I$(srcdir)/includes/
 
-libscispecial_functions_la_CFLAGS=     -I$(srcdir)/includes/ \
+# Includes need for the compilation
+libscispecial_functions_la_CPPFLAGS = -I$(srcdir)/includes/ \
+-I$(srcdir)/src/c/ \
+-I$(top_srcdir)/libs/MALLOC/includes/ \
+-I$(top_srcdir)/modules/api_scilab/includes \
+-I$(top_srcdir)/modules/output_stream/includes
+
+# Includes need for the compilation
+libscispecial_functions_la_CFLAGS=     -I$(srcdir)/includes/ \
+-I$(top_srcdir)/libs/MALLOC/includes/ \
+-I$(srcdir)/src/c/ \
+-I$(top_srcdir)/modules/core/src/c/ \
+-I$(top_srcdir)/modules/elementary_functions/includes \
 -I$(top_srcdir)/modules/api_scilab/includes \
--I$(top_srcdir)/modules/elementary_functions/includes/ \
--I$(top_srcdir)/modules/output_stream/includes/
+-I$(top_srcdir)/modules/output_stream/includes
 
 pkglib_LTLIBRARIES = libscispecial_functions.la
+noinst_LTLIBRARIES = libscispecial_functions-algo.la
 
 libscispecial_functions_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
 
-libscispecial_functions_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES)
+libscispecial_functions_algo_la_SOURCES = $(SPECIAL_FUNCTIONS_C_SOURCES) $(SPECIAL_FUNCTIONS_FORTRAN_SOURCES) $(SPECIAL_FUNCTIONS_CPP_SOURCES)
+libscispecial_functions_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES) 
+libscispecial_functions_algo_la_CFLAGS = $(libscispecial_functions_la_CFLAGS)
 
 # For the code check (splint)
-CHECK_SRC = $(GATEWAY_C_SOURCES)
+CHECK_SRC= $(SPECIAL_FUNCTIONS_C_SOURCES) $(GATEWAY_C_SOURCES)
 INCLUDE_FLAGS = $(libscispecial_functions_la_CFLAGS)
 
-libscispecial_functions_la_LIBADD =    $(top_builddir)/modules/output_stream/libscioutput_stream.la $(top_builddir)/modules/elementary_functions/libscielementary_functions.la $(top_builddir)/modules/statistics/libscistatistics.la
-
+libscispecial_functions_la_LIBADD = libscispecial_functions-algo.la $(top_builddir)/modules/output_stream/libscioutput_stream.la $(top_builddir)/modules/elementary_functions/libscielementary_functions.la $(top_builddir)/modules/statistics/libscistatistics.la 
 
 #### Target ######
 modulename=special_functions
@@ -50,12 +80,15 @@ modulename=special_functions
 libscispecial_functions_la_rootdir = $(mydatadir)
 libscispecial_functions_la_root_DATA =  license.txt 
 
-#### special_functions : init scripts ####
+
+
+#### special_functions : init scripts ####
 libscispecial_functions_la_etcdir = $(mydatadir)/etc
 libscispecial_functions_la_etc_DATA = etc/special_functions.quit etc/special_functions.start
 
-#### special_functions : gateway declaration ####
+#### special_functions : gateway declaration ####
 libscispecial_functions_la_sci_gatewaydir = $(mydatadir)/sci_gateway
 libscispecial_functions_la_sci_gateway_DATA = sci_gateway/special_functions_gateway.xml
 
+
 include $(top_srcdir)/Makefile.incl.am
index b9400cc..b0f33ee 100644 (file)
@@ -17,6 +17,7 @@
 
 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 # Copyright (C) 2006 - INRIA - Sylvestre LEDRU
+# Copyright (C) 2011 - DIGITEO - Allan CORNET
 #
 # This file is distributed under the same license as the Scilab package.
 
@@ -107,12 +108,22 @@ am__installdirs = "$(DESTDIR)$(pkglibdir)" \
        "$(DESTDIR)$(libscispecial_functions_la_etcdir)" \
        "$(DESTDIR)$(libscispecial_functions_la_rootdir)" \
        "$(DESTDIR)$(libscispecial_functions_la_sci_gatewaydir)"
-LTLIBRARIES = $(pkglib_LTLIBRARIES)
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES)
+libscispecial_functions_algo_la_LIBADD =
+am__objects_1 = libscispecial_functions_algo_la-zbeshv.lo
+am__objects_2 = dbesig.lo dbesjg.lo dbeskg.lo dbesyg.lo zbesig.lo \
+       zbesjg.lo zbeskg.lo zbesyg.lo
+am__objects_3 =
+am_libscispecial_functions_algo_la_OBJECTS = $(am__objects_1) \
+       $(am__objects_2) $(am__objects_3)
+libscispecial_functions_algo_la_OBJECTS =  \
+       $(am_libscispecial_functions_algo_la_OBJECTS)
 libscispecial_functions_la_DEPENDENCIES =  \
+       libscispecial_functions-algo.la \
        $(top_builddir)/modules/output_stream/libscioutput_stream.la \
        $(top_builddir)/modules/elementary_functions/libscielementary_functions.la \
        $(top_builddir)/modules/statistics/libscistatistics.la
-am__objects_1 = libscispecial_functions_la-sci_dlgamma.lo \
+am__objects_4 = libscispecial_functions_la-sci_dlgamma.lo \
        libscispecial_functions_la-sci_bessely.lo \
        libscispecial_functions_la-sci_beta.lo \
        libscispecial_functions_la-sci_gamma.lo \
@@ -124,16 +135,18 @@ am__objects_1 = libscispecial_functions_la-sci_dlgamma.lo \
        libscispecial_functions_la-sci_calerf.lo \
        libscispecial_functions_la-gw_special_functions.lo \
        libscispecial_functions_la-sci_lgamma.lo
-am__objects_2 = sci_f_dlgamma.lo sci_f_lgamma.lo sci_f_gamma.lo \
-       sci_f_calerf.lo
-am_libscispecial_functions_la_OBJECTS = $(am__objects_1) \
-       $(am__objects_2)
+am__objects_5 = libscispecial_functions_la-sci_f_dlgamma.lo \
+       libscispecial_functions_la-sci_f_lgamma.lo \
+       libscispecial_functions_la-sci_f_gamma.lo \
+       libscispecial_functions_la-sci_f_calerf.lo
+am_libscispecial_functions_la_OBJECTS = $(am__objects_4) \
+       $(am__objects_5)
 libscispecial_functions_la_OBJECTS =  \
        $(am_libscispecial_functions_la_OBJECTS)
 libscispecial_functions_la_LINK = $(LIBTOOL) --tag=F77 \
        $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(F77LD) \
-       $(AM_FFLAGS) $(FFLAGS) $(libscispecial_functions_la_LDFLAGS) \
-       $(LDFLAGS) -o $@
+       $(libscispecial_functions_la_FFLAGS) $(FFLAGS) \
+       $(libscispecial_functions_la_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
@@ -154,8 +167,10 @@ F77LD = $(F77)
 F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \
        $(LDFLAGS) -o $@
-SOURCES = $(libscispecial_functions_la_SOURCES)
-DIST_SOURCES = $(libscispecial_functions_la_SOURCES)
+SOURCES = $(libscispecial_functions_algo_la_SOURCES) \
+       $(libscispecial_functions_la_SOURCES)
+DIST_SOURCES = $(libscispecial_functions_algo_la_SOURCES) \
+       $(libscispecial_functions_la_SOURCES)
 DATA = $(libscispecial_functions_la_etc_DATA) \
        $(libscispecial_functions_la_root_DATA) \
        $(libscispecial_functions_la_sci_gateway_DATA)
@@ -415,6 +430,20 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+SPECIAL_FUNCTIONS_C_SOURCES = src/c/zbeshv.c
+
+# List of the cpp files
+SPECIAL_FUNCTIONS_CPP_SOURCES = 
+SPECIAL_FUNCTIONS_FORTRAN_SOURCES = \
+src/fortran/dbesig.f \
+src/fortran/dbesjg.f \
+src/fortran/dbeskg.f \
+src/fortran/dbesyg.f \
+src/fortran/zbesig.f \
+src/fortran/zbesjg.f \
+src/fortran/zbeskg.f \
+src/fortran/zbesyg.f
+
 GATEWAY_C_SOURCES = sci_gateway/c/sci_dlgamma.c \
 sci_gateway/c/sci_bessely.c \
 sci_gateway/c/sci_beta.c \
@@ -433,20 +462,38 @@ sci_gateway/fortran/sci_f_lgamma.f \
 sci_gateway/fortran/sci_f_gamma.f \
 sci_gateway/fortran/sci_f_calerf.f
 
-libscispecial_functions_la_includedir = $(pkgincludedir)
+
+# Includes need for the compilation
+libscispecial_functions_la_FFLAGS = -I$(srcdir)/includes/
+
+# Includes need for the compilation
+libscispecial_functions_la_CPPFLAGS = -I$(srcdir)/includes/ \
+-I$(srcdir)/src/c/ \
+-I$(top_srcdir)/libs/MALLOC/includes/ \
+-I$(top_srcdir)/modules/api_scilab/includes \
+-I$(top_srcdir)/modules/output_stream/includes
+
+
+# Includes need for the compilation
 libscispecial_functions_la_CFLAGS = -I$(srcdir)/includes/ \
+-I$(top_srcdir)/libs/MALLOC/includes/ \
+-I$(srcdir)/src/c/ \
+-I$(top_srcdir)/modules/core/src/c/ \
+-I$(top_srcdir)/modules/elementary_functions/includes \
 -I$(top_srcdir)/modules/api_scilab/includes \
--I$(top_srcdir)/modules/elementary_functions/includes/ \
--I$(top_srcdir)/modules/output_stream/includes/
+-I$(top_srcdir)/modules/output_stream/includes
 
 pkglib_LTLIBRARIES = libscispecial_functions.la
+noinst_LTLIBRARIES = libscispecial_functions-algo.la
 libscispecial_functions_la_LDFLAGS = -version-number $(SCILAB_LIBRARY_VERSION)
-libscispecial_functions_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES)
+libscispecial_functions_algo_la_SOURCES = $(SPECIAL_FUNCTIONS_C_SOURCES) $(SPECIAL_FUNCTIONS_FORTRAN_SOURCES) $(SPECIAL_FUNCTIONS_CPP_SOURCES)
+libscispecial_functions_la_SOURCES = $(GATEWAY_C_SOURCES) $(GATEWAY_FORTRAN_SOURCES) 
+libscispecial_functions_algo_la_CFLAGS = $(libscispecial_functions_la_CFLAGS)
 
 # For the code check (splint)
-CHECK_SRC = $(GATEWAY_C_SOURCES)
+CHECK_SRC = $(SPECIAL_FUNCTIONS_C_SOURCES) $(GATEWAY_C_SOURCES)
 INCLUDE_FLAGS = $(libscispecial_functions_la_CFLAGS)
-libscispecial_functions_la_LIBADD = $(top_builddir)/modules/output_stream/libscioutput_stream.la $(top_builddir)/modules/elementary_functions/libscielementary_functions.la $(top_builddir)/modules/statistics/libscistatistics.la
+libscispecial_functions_la_LIBADD = libscispecial_functions-algo.la $(top_builddir)/modules/output_stream/libscioutput_stream.la $(top_builddir)/modules/elementary_functions/libscielementary_functions.la $(top_builddir)/modules/statistics/libscistatistics.la 
 
 #### Target ######
 modulename = special_functions
@@ -455,11 +502,11 @@ modulename = special_functions
 libscispecial_functions_la_rootdir = $(mydatadir)
 libscispecial_functions_la_root_DATA = license.txt 
 
-#### special_functions : init scripts ####
+#### special_functions : init scripts ####
 libscispecial_functions_la_etcdir = $(mydatadir)/etc
 libscispecial_functions_la_etc_DATA = etc/special_functions.quit etc/special_functions.start
 
-#### special_functions : gateway declaration ####
+#### special_functions : gateway declaration ####
 libscispecial_functions_la_sci_gatewaydir = $(mydatadir)/sci_gateway
 libscispecial_functions_la_sci_gateway_DATA = sci_gateway/special_functions_gateway.xml
 
@@ -559,6 +606,15 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(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)"
@@ -590,6 +646,8 @@ clean-pkglibLTLIBRARIES:
          echo "rm -f \"$${dir}/so_locations\""; \
          rm -f "$${dir}/so_locations"; \
        done
+libscispecial_functions-algo.la: $(libscispecial_functions_algo_la_OBJECTS) $(libscispecial_functions_algo_la_DEPENDENCIES) 
+       $(F77LINK)  $(libscispecial_functions_algo_la_OBJECTS) $(libscispecial_functions_algo_la_LIBADD) $(LIBS)
 libscispecial_functions.la: $(libscispecial_functions_la_OBJECTS) $(libscispecial_functions_la_DEPENDENCIES) 
        $(libscispecial_functions_la_LINK) -rpath $(pkglibdir) $(libscispecial_functions_la_OBJECTS) $(libscispecial_functions_la_LIBADD) $(LIBS)
 
@@ -599,6 +657,7 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispecial_functions_algo_la-zbeshv.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispecial_functions_la-gw_special_functions.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispecial_functions_la-sci_besselh.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscispecial_functions_la-sci_besseli.Plo@am__quote@
@@ -633,89 +692,96 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
 
+libscispecial_functions_algo_la-zbeshv.lo: src/c/zbeshv.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_algo_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_algo_la-zbeshv.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_algo_la-zbeshv.Tpo -c -o libscispecial_functions_algo_la-zbeshv.lo `test -f 'src/c/zbeshv.c' || echo '$(srcdir)/'`src/c/zbeshv.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_algo_la-zbeshv.Tpo $(DEPDIR)/libscispecial_functions_algo_la-zbeshv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/zbeshv.c' object='libscispecial_functions_algo_la-zbeshv.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_algo_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_algo_la-zbeshv.lo `test -f 'src/c/zbeshv.c' || echo '$(srcdir)/'`src/c/zbeshv.c
+
 libscispecial_functions_la-sci_dlgamma.lo: sci_gateway/c/sci_dlgamma.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_dlgamma.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_dlgamma.Tpo -c -o libscispecial_functions_la-sci_dlgamma.lo `test -f 'sci_gateway/c/sci_dlgamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_dlgamma.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_dlgamma.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_dlgamma.Tpo -c -o libscispecial_functions_la-sci_dlgamma.lo `test -f 'sci_gateway/c/sci_dlgamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_dlgamma.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_dlgamma.Tpo $(DEPDIR)/libscispecial_functions_la-sci_dlgamma.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_dlgamma.c' object='libscispecial_functions_la-sci_dlgamma.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_dlgamma.lo `test -f 'sci_gateway/c/sci_dlgamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_dlgamma.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_dlgamma.lo `test -f 'sci_gateway/c/sci_dlgamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_dlgamma.c
 
 libscispecial_functions_la-sci_bessely.lo: sci_gateway/c/sci_bessely.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_bessely.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_bessely.Tpo -c -o libscispecial_functions_la-sci_bessely.lo `test -f 'sci_gateway/c/sci_bessely.c' || echo '$(srcdir)/'`sci_gateway/c/sci_bessely.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_bessely.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_bessely.Tpo -c -o libscispecial_functions_la-sci_bessely.lo `test -f 'sci_gateway/c/sci_bessely.c' || echo '$(srcdir)/'`sci_gateway/c/sci_bessely.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_bessely.Tpo $(DEPDIR)/libscispecial_functions_la-sci_bessely.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_bessely.c' object='libscispecial_functions_la-sci_bessely.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_bessely.lo `test -f 'sci_gateway/c/sci_bessely.c' || echo '$(srcdir)/'`sci_gateway/c/sci_bessely.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_bessely.lo `test -f 'sci_gateway/c/sci_bessely.c' || echo '$(srcdir)/'`sci_gateway/c/sci_bessely.c
 
 libscispecial_functions_la-sci_beta.lo: sci_gateway/c/sci_beta.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_beta.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_beta.Tpo -c -o libscispecial_functions_la-sci_beta.lo `test -f 'sci_gateway/c/sci_beta.c' || echo '$(srcdir)/'`sci_gateway/c/sci_beta.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_beta.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_beta.Tpo -c -o libscispecial_functions_la-sci_beta.lo `test -f 'sci_gateway/c/sci_beta.c' || echo '$(srcdir)/'`sci_gateway/c/sci_beta.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_beta.Tpo $(DEPDIR)/libscispecial_functions_la-sci_beta.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_beta.c' object='libscispecial_functions_la-sci_beta.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_beta.lo `test -f 'sci_gateway/c/sci_beta.c' || echo '$(srcdir)/'`sci_gateway/c/sci_beta.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_beta.lo `test -f 'sci_gateway/c/sci_beta.c' || echo '$(srcdir)/'`sci_gateway/c/sci_beta.c
 
 libscispecial_functions_la-sci_gamma.lo: sci_gateway/c/sci_gamma.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_gamma.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_gamma.Tpo -c -o libscispecial_functions_la-sci_gamma.lo `test -f 'sci_gateway/c/sci_gamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_gamma.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_gamma.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_gamma.Tpo -c -o libscispecial_functions_la-sci_gamma.lo `test -f 'sci_gateway/c/sci_gamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_gamma.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_gamma.Tpo $(DEPDIR)/libscispecial_functions_la-sci_gamma.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_gamma.c' object='libscispecial_functions_la-sci_gamma.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_gamma.lo `test -f 'sci_gateway/c/sci_gamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_gamma.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_gamma.lo `test -f 'sci_gateway/c/sci_gamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_gamma.c
 
 libscispecial_functions_la-sci_legendre.lo: sci_gateway/c/sci_legendre.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_legendre.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_legendre.Tpo -c -o libscispecial_functions_la-sci_legendre.lo `test -f 'sci_gateway/c/sci_legendre.c' || echo '$(srcdir)/'`sci_gateway/c/sci_legendre.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_legendre.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_legendre.Tpo -c -o libscispecial_functions_la-sci_legendre.lo `test -f 'sci_gateway/c/sci_legendre.c' || echo '$(srcdir)/'`sci_gateway/c/sci_legendre.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_legendre.Tpo $(DEPDIR)/libscispecial_functions_la-sci_legendre.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_legendre.c' object='libscispecial_functions_la-sci_legendre.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_legendre.lo `test -f 'sci_gateway/c/sci_legendre.c' || echo '$(srcdir)/'`sci_gateway/c/sci_legendre.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_legendre.lo `test -f 'sci_gateway/c/sci_legendre.c' || echo '$(srcdir)/'`sci_gateway/c/sci_legendre.c
 
 libscispecial_functions_la-sci_besselh.lo: sci_gateway/c/sci_besselh.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_besselh.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_besselh.Tpo -c -o libscispecial_functions_la-sci_besselh.lo `test -f 'sci_gateway/c/sci_besselh.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselh.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_besselh.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_besselh.Tpo -c -o libscispecial_functions_la-sci_besselh.lo `test -f 'sci_gateway/c/sci_besselh.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselh.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_besselh.Tpo $(DEPDIR)/libscispecial_functions_la-sci_besselh.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_besselh.c' object='libscispecial_functions_la-sci_besselh.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_besselh.lo `test -f 'sci_gateway/c/sci_besselh.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselh.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_besselh.lo `test -f 'sci_gateway/c/sci_besselh.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselh.c
 
 libscispecial_functions_la-sci_besseli.lo: sci_gateway/c/sci_besseli.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_besseli.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_besseli.Tpo -c -o libscispecial_functions_la-sci_besseli.lo `test -f 'sci_gateway/c/sci_besseli.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besseli.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_besseli.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_besseli.Tpo -c -o libscispecial_functions_la-sci_besseli.lo `test -f 'sci_gateway/c/sci_besseli.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besseli.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_besseli.Tpo $(DEPDIR)/libscispecial_functions_la-sci_besseli.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_besseli.c' object='libscispecial_functions_la-sci_besseli.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_besseli.lo `test -f 'sci_gateway/c/sci_besseli.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besseli.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_besseli.lo `test -f 'sci_gateway/c/sci_besseli.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besseli.c
 
 libscispecial_functions_la-sci_besselj.lo: sci_gateway/c/sci_besselj.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_besselj.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_besselj.Tpo -c -o libscispecial_functions_la-sci_besselj.lo `test -f 'sci_gateway/c/sci_besselj.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselj.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_besselj.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_besselj.Tpo -c -o libscispecial_functions_la-sci_besselj.lo `test -f 'sci_gateway/c/sci_besselj.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselj.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_besselj.Tpo $(DEPDIR)/libscispecial_functions_la-sci_besselj.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_besselj.c' object='libscispecial_functions_la-sci_besselj.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_besselj.lo `test -f 'sci_gateway/c/sci_besselj.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselj.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_besselj.lo `test -f 'sci_gateway/c/sci_besselj.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselj.c
 
 libscispecial_functions_la-sci_besselk.lo: sci_gateway/c/sci_besselk.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_besselk.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_besselk.Tpo -c -o libscispecial_functions_la-sci_besselk.lo `test -f 'sci_gateway/c/sci_besselk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselk.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_besselk.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_besselk.Tpo -c -o libscispecial_functions_la-sci_besselk.lo `test -f 'sci_gateway/c/sci_besselk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselk.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_besselk.Tpo $(DEPDIR)/libscispecial_functions_la-sci_besselk.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_besselk.c' object='libscispecial_functions_la-sci_besselk.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_besselk.lo `test -f 'sci_gateway/c/sci_besselk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselk.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_besselk.lo `test -f 'sci_gateway/c/sci_besselk.c' || echo '$(srcdir)/'`sci_gateway/c/sci_besselk.c
 
 libscispecial_functions_la-sci_calerf.lo: sci_gateway/c/sci_calerf.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_calerf.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_calerf.Tpo -c -o libscispecial_functions_la-sci_calerf.lo `test -f 'sci_gateway/c/sci_calerf.c' || echo '$(srcdir)/'`sci_gateway/c/sci_calerf.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_calerf.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_calerf.Tpo -c -o libscispecial_functions_la-sci_calerf.lo `test -f 'sci_gateway/c/sci_calerf.c' || echo '$(srcdir)/'`sci_gateway/c/sci_calerf.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_calerf.Tpo $(DEPDIR)/libscispecial_functions_la-sci_calerf.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_calerf.c' object='libscispecial_functions_la-sci_calerf.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_calerf.lo `test -f 'sci_gateway/c/sci_calerf.c' || echo '$(srcdir)/'`sci_gateway/c/sci_calerf.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_calerf.lo `test -f 'sci_gateway/c/sci_calerf.c' || echo '$(srcdir)/'`sci_gateway/c/sci_calerf.c
 
 libscispecial_functions_la-gw_special_functions.lo: sci_gateway/c/gw_special_functions.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-gw_special_functions.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-gw_special_functions.Tpo -c -o libscispecial_functions_la-gw_special_functions.lo `test -f 'sci_gateway/c/gw_special_functions.c' || echo '$(srcdir)/'`sci_gateway/c/gw_special_functions.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-gw_special_functions.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-gw_special_functions.Tpo -c -o libscispecial_functions_la-gw_special_functions.lo `test -f 'sci_gateway/c/gw_special_functions.c' || echo '$(srcdir)/'`sci_gateway/c/gw_special_functions.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-gw_special_functions.Tpo $(DEPDIR)/libscispecial_functions_la-gw_special_functions.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/gw_special_functions.c' object='libscispecial_functions_la-gw_special_functions.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-gw_special_functions.lo `test -f 'sci_gateway/c/gw_special_functions.c' || echo '$(srcdir)/'`sci_gateway/c/gw_special_functions.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-gw_special_functions.lo `test -f 'sci_gateway/c/gw_special_functions.c' || echo '$(srcdir)/'`sci_gateway/c/gw_special_functions.c
 
 libscispecial_functions_la-sci_lgamma.lo: sci_gateway/c/sci_lgamma.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_lgamma.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_lgamma.Tpo -c -o libscispecial_functions_la-sci_lgamma.lo `test -f 'sci_gateway/c/sci_lgamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_lgamma.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -MT libscispecial_functions_la-sci_lgamma.lo -MD -MP -MF $(DEPDIR)/libscispecial_functions_la-sci_lgamma.Tpo -c -o libscispecial_functions_la-sci_lgamma.lo `test -f 'sci_gateway/c/sci_lgamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_lgamma.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscispecial_functions_la-sci_lgamma.Tpo $(DEPDIR)/libscispecial_functions_la-sci_lgamma.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='sci_gateway/c/sci_lgamma.c' object='libscispecial_functions_la-sci_lgamma.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_lgamma.lo `test -f 'sci_gateway/c/sci_lgamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_lgamma.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscispecial_functions_la_CPPFLAGS) $(CPPFLAGS) $(libscispecial_functions_la_CFLAGS) $(CFLAGS) -c -o libscispecial_functions_la-sci_lgamma.lo `test -f 'sci_gateway/c/sci_lgamma.c' || echo '$(srcdir)/'`sci_gateway/c/sci_lgamma.c
 
 .f.o:
        $(F77COMPILE) -c -o $@ $<
@@ -726,17 +792,41 @@ libscispecial_functions_la-sci_lgamma.lo: sci_gateway/c/sci_lgamma.c
 .f.lo:
        $(LTF77COMPILE) -c -o $@ $<
 
-sci_f_dlgamma.lo: sci_gateway/fortran/sci_f_dlgamma.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sci_f_dlgamma.lo `test -f 'sci_gateway/fortran/sci_f_dlgamma.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_dlgamma.f
+dbesig.lo: src/fortran/dbesig.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dbesig.lo `test -f 'src/fortran/dbesig.f' || echo '$(srcdir)/'`src/fortran/dbesig.f
+
+dbesjg.lo: src/fortran/dbesjg.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dbesjg.lo `test -f 'src/fortran/dbesjg.f' || echo '$(srcdir)/'`src/fortran/dbesjg.f
+
+dbeskg.lo: src/fortran/dbeskg.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dbeskg.lo `test -f 'src/fortran/dbeskg.f' || echo '$(srcdir)/'`src/fortran/dbeskg.f
+
+dbesyg.lo: src/fortran/dbesyg.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o dbesyg.lo `test -f 'src/fortran/dbesyg.f' || echo '$(srcdir)/'`src/fortran/dbesyg.f
 
-sci_f_lgamma.lo: sci_gateway/fortran/sci_f_lgamma.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sci_f_lgamma.lo `test -f 'sci_gateway/fortran/sci_f_lgamma.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_lgamma.f
+zbesig.lo: src/fortran/zbesig.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbesig.lo `test -f 'src/fortran/zbesig.f' || echo '$(srcdir)/'`src/fortran/zbesig.f
 
-sci_f_gamma.lo: sci_gateway/fortran/sci_f_gamma.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sci_f_gamma.lo `test -f 'sci_gateway/fortran/sci_f_gamma.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_gamma.f
+zbesjg.lo: src/fortran/zbesjg.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbesjg.lo `test -f 'src/fortran/zbesjg.f' || echo '$(srcdir)/'`src/fortran/zbesjg.f
 
-sci_f_calerf.lo: sci_gateway/fortran/sci_f_calerf.f
-       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o sci_f_calerf.lo `test -f 'sci_gateway/fortran/sci_f_calerf.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_calerf.f
+zbeskg.lo: src/fortran/zbeskg.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbeskg.lo `test -f 'src/fortran/zbeskg.f' || echo '$(srcdir)/'`src/fortran/zbeskg.f
+
+zbesyg.lo: src/fortran/zbesyg.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) -c -o zbesyg.lo `test -f 'src/fortran/zbesyg.f' || echo '$(srcdir)/'`src/fortran/zbesyg.f
+
+libscispecial_functions_la-sci_f_dlgamma.lo: sci_gateway/fortran/sci_f_dlgamma.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(libscispecial_functions_la_FFLAGS) $(FFLAGS) -c -o libscispecial_functions_la-sci_f_dlgamma.lo `test -f 'sci_gateway/fortran/sci_f_dlgamma.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_dlgamma.f
+
+libscispecial_functions_la-sci_f_lgamma.lo: sci_gateway/fortran/sci_f_lgamma.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(libscispecial_functions_la_FFLAGS) $(FFLAGS) -c -o libscispecial_functions_la-sci_f_lgamma.lo `test -f 'sci_gateway/fortran/sci_f_lgamma.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_lgamma.f
+
+libscispecial_functions_la-sci_f_gamma.lo: sci_gateway/fortran/sci_f_gamma.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(libscispecial_functions_la_FFLAGS) $(FFLAGS) -c -o libscispecial_functions_la-sci_f_gamma.lo `test -f 'sci_gateway/fortran/sci_f_gamma.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_gamma.f
+
+libscispecial_functions_la-sci_f_calerf.lo: sci_gateway/fortran/sci_f_calerf.f
+       $(LIBTOOL)  --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(F77) $(libscispecial_functions_la_FFLAGS) $(FFLAGS) -c -o libscispecial_functions_la-sci_f_calerf.lo `test -f 'sci_gateway/fortran/sci_f_calerf.f' || echo '$(srcdir)/'`sci_gateway/fortran/sci_f_calerf.f
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -922,7 +1012,7 @@ maintainer-clean-generic:
 clean: clean-am
 
 clean-am: clean-generic clean-libtool clean-local \
-       clean-pkglibLTLIBRARIES mostlyclean-am
+       clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
        -rm -rf ./$(DEPDIR)
@@ -1000,14 +1090,14 @@ uninstall-am: uninstall-libscispecial_functions_la_etcDATA \
 
 .PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
        clean clean-generic clean-libtool clean-local \
-       clean-pkglibLTLIBRARIES ctags distclean distclean-compile \
-       distclean-generic distclean-libtool distclean-local \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am \
-       install-data-local install-dvi install-dvi-am install-exec \
-       install-exec-am install-html install-html-am \
-       install-html-local install-info install-info-am \
-       install-libscispecial_functions_la_etcDATA \
+       clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES ctags \
+       distclean distclean-compile distclean-generic \
+       distclean-libtool distclean-local distclean-tags distdir dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-data-local install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-html-local install-info \
+       install-info-am install-libscispecial_functions_la_etcDATA \
        install-libscispecial_functions_la_rootDATA \
        install-libscispecial_functions_la_sci_gatewayDATA install-man \
        install-pdf install-pdf-am install-pkglibLTLIBRARIES \
index e4451da..8c6415e 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2005-2008 - INRIA - Serge STEER <serge.steer@inria.fr>
+ * Copyright (C) 2011 - 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
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
-
+/*--------------------------------------------------------------------------*/
 #include <string.h>
 #include "gw_special_functions.h"
 #include "stack-c.h"
 #include "Scierror.h"
 #include "msgs.h"
-/*--------------------------------------------------------------------------*/
-extern void  C2F(zbeshv) (double *xr,double *xi,int* nx, double *alpha,
-                          int *na,int *kode, int *K, double *rr,double *ri,
-                          double *wr, double *wi, int *ierr);
+#include "zbeshv.h"
 /*--------------------------------------------------------------------------*/
 int sci_besselh(char *fname,unsigned long fname_len)
 {
@@ -82,13 +80,23 @@ int sci_besselh(char *fname,unsigned long fname_len)
     { 
         /*bessely(scalar,matrix) */
         double wr[3],wi[3];
+        double *xr = stk(l2);
+        double *xi = stk(l2i);
+        double *alpha = stk(l1);
+        double *yr = NULL;
+        double *yi = NULL;
+
         mr = m2;
         nr = n2;    
         CreateCVar(lpos+1,MATRIX_OF_DOUBLE_DATATYPE,&itr,&mr,&nr,&lr,&li);
-        LhsVar(1) = lpos + 1;
+        yr = stk(lr);
+        yi = stk(li);
+
         nx = m2*n2;
         na = 1;
-        C2F(zbeshv) (stk(l2),stk(l2i),&nx,stk(l1),&na,&kode,&K,stk(lr),stk(li),wr,wi,&ierr);
+
+        zbeshv(xr, xi, &nx, alpha, &na, &kode, &K, yr, yi, wr, wi, &ierr);
+        LhsVar(1) = lpos + 1;
     }
     else if (m2*n2 == 1) 
     { 
@@ -101,7 +109,7 @@ int sci_besselh(char *fname,unsigned long fname_len)
         na = m1*n1;
         nw = 3*na;
         CreateCVar(lpos+2,MATRIX_OF_DOUBLE_DATATYPE,&itr,&nx,&nw,&llwr,&llwi);
-        C2F(zbeshv) (stk(l2),stk(l2i),&nx,stk(l1),&na,&kode,&K,stk(lr),stk(li),stk(llwr),stk(llwi),&ierr);
+        zbeshv (stk(l2),stk(l2i),&nx,stk(l1),&na,&kode,&K,stk(lr),stk(li),stk(llwr),stk(llwi),&ierr);
         LhsVar(1) = lpos + 1;
     }
     else if ((m1==1 && n2==1)|| (n1==1 && m2==1)) 
@@ -115,7 +123,7 @@ int sci_besselh(char *fname,unsigned long fname_len)
         na = m1*n1;
         nw = 3*na;
         CreateCVar(lpos+2,MATRIX_OF_DOUBLE_DATATYPE,&itr,&lun,&nw,&lwr,&lwi);
-        C2F(zbeshv) (stk(l2),stk(l2i),&nx,stk(l1),&na,&kode,&K, stk(lr),stk(li),stk(lwr),stk(lwi),&ierr);
+        zbeshv (stk(l2),stk(l2i),&nx,stk(l1),&na,&kode,&K, stk(lr),stk(li),stk(lwr),stk(lwi),&ierr);
 
         LhsVar(1) = lpos + 1;
     }
@@ -130,7 +138,7 @@ int sci_besselh(char *fname,unsigned long fname_len)
         LhsVar(1) = lpos + 1;
         nx = mr * nr;
         na = -1;
-        C2F(zbeshv) (stk(l2),stk(l2i),&nx,stk(l1),&na,&kode,&K,stk(lr),stk(li),wr,wi,&ierr);
+        zbeshv (stk(l2),stk(l2i),&nx,stk(l1),&na,&kode,&K,stk(lr),stk(li),wr,wi,&ierr);
     }
     if (ierr == 2) 
     {
@@ -147,7 +155,7 @@ int sci_besselh(char *fname,unsigned long fname_len)
     }
     else if (ierr == 3) 
     {
-        /* inacurate result */
+        /* inaccurate result */
         ierr = 4;
         C2F(msgs)(&ierr,&un);
     }
index 718688c..d6bf3a6 100644 (file)
@@ -21,4 +21,5 @@ check_dim_prop
 createcvar_
 check_scalar
 check_same_dims
-getWarningMode
\ No newline at end of file
+getWarningMode
+returnanan_
\ No newline at end of file
index 75074ed..24d32df 100644 (file)
@@ -249,10 +249,12 @@ lib /DEF:"$(ProjectDir)special_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MACHI
     <ClCompile Include="..\..\sci_gateway\c\sci_gamma.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_legendre.c" />
     <ClCompile Include="..\..\sci_gateway\c\sci_lgamma.c" />
+    <ClCompile Include="zbeshv.c" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\dynlib_special_functions.h" />
     <ClInclude Include="..\..\includes\gw_special_functions.h" />
+    <ClInclude Include="zbeshv.h" />
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\locales\en_US\special_functions.pot" />
index de87ca6..c8ee5cb 100644 (file)
@@ -62,6 +62,9 @@
     <ClCompile Include="..\..\sci_gateway\c\sci_lgamma.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="zbeshv.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\includes\dynlib_special_functions.h">
@@ -70,6 +73,9 @@
     <ClInclude Include="..\..\includes\gw_special_functions.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="zbeshv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\locales\en_US\special_functions.pot">
index 29c299d..969de60 100644 (file)
@@ -5,11 +5,15 @@ EXPORTS
 ; --------------------------------------- 
 ; special_functions_f
 ; --------------------------------------- 
-intsbessely_
-intsbesselk_
-intsbesselj_
-intsbesseli_
 intslgamma_
 intsgamma_
 intsdlgamma_
-intscalerf_
\ No newline at end of file
+intscalerf_
+zbesiv_
+dbesiv_ 
+zbesjv_
+dbesjv_
+zbeskv_
+dbeskv_
+zbesyv_
+dbesyv_
diff --git a/scilab/modules/special_functions/src/c/zbeshv.c b/scilab/modules/special_functions/src/c/zbeshv.c
new file mode 100644 (file)
index 0000000..c88abd3
--- /dev/null
@@ -0,0 +1,255 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2005-2008 - INRIA - Serge STEER
+* Copyright (C) 2011 - 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
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+#include "zbeshv.h"
+#include "machine.h"
+#include "core_math.h"
+#include "returnanan.h"
+/*--------------------------------------------------------------------------*/
+/* fortran subroutines */
+extern int C2F(dset)();
+extern int C2F(dscal)();
+extern int C2F(wscal)();
+extern int C2F(zbesh)();
+extern int C2F(dcopy)();
+extern double C2F(dlamch)();
+/*--------------------------------------------------------------------------*/
+static int zbeshg(double *x1r, double *x1i, double *alpha, 
+    int *kode, int *k, int *n, double *yr,
+    double *yi, int *nz, double *wr,
+    double *wi, int *ierr);
+/*--------------------------------------------------------------------------*/
+/* compute besseli function for x and alpha given by vectors */
+/* w : working array of size 2*na (used only if nz>0 and alpha */
+/* contains negative values */
+int zbeshv(double *xr, double *xi, int *nx, 
+    double *alpha, int *na, int *kode, int *k, double 
+    *yr, double *yi, double *wr, double *wi, int *ierr)
+{
+    double eps = C2F(dlamch)("p", strlen("p"));
+    int iOne = 1;
+    int i = 0, j = 0, nz = 0;
+
+    *ierr = 0;
+    if (*na < 0) 
+    {
+        /* element wise case x and alpha are supposed to have the same size */
+        for (i = 1; i <= *nx; ++i) 
+        {
+            int ier = 0;
+            zbeshg(&xr[i - 1], &xi[i - 1], &alpha[i - 1], kode, k, &iOne, &yr[i - 1],
+                &yi[i - 1], &nz, &wr[1], &wi[0], &ier);
+            *ierr = Max(*ierr,ier);
+        }
+    } 
+    else if (*na == 1) 
+    {
+        for (i = 1; i <= *nx; ++i) 
+        {
+            int ier = 0;
+            zbeshg(&xr[i - 1], &xi[i - 1], &alpha[0], kode, k, &iOne, &yr[i - 1], 
+                &yi[i - 1], &nz, &wr[0], &wi[0], &ier);
+            *ierr = Max(*ierr, ier);
+        }
+    } 
+    else 
+    {
+        /* compute besselh(x(i),y(j)), i=1,nx,j=1,na */
+        double dTmp = 0;
+        int n = 0;
+        int  l = 1;
+L5:
+        n = 0;
+L10:
+        ++n;
+        j = l + n;
+        if (j <= *na && (dTmp = alpha[j] + 1 - alpha[j - 1], fabs(dTmp)) <= eps) 
+        {
+            goto L10;
+        }
+        for (i = 1; i <= *nx; ++i) 
+        {
+            int ier = 0;
+            zbeshg(&xr[i - 1], &xi[i - 1], &alpha[l - 1], kode, k, &n, &wr[0], &wi[0],
+                &nz, &wr[*na], &wi[*na], &ier);
+
+            *ierr = Max(*ierr,ier);
+
+            C2F(dcopy)(&n, &wr[0], &iOne, &yr[(i + (l - 1) * *nx) - 1], nx);
+
+            C2F(dcopy)(&n, &wi[0], &iOne, &yi[(i + (l - 1) * *nx) - 1], nx);
+        }
+
+        l = j;
+
+        if (l <= *na) 
+        {
+            goto L5;
+        }
+    }
+    return 0;
+}
+/*--------------------------------------------------------------------------*/
+static int zbeshg(double *x1r, double *x1i, double *alpha, 
+    int *kode, int *k, int *n, double *yr,
+    double *yi, int *nz, double *wr,
+    double *wi, int *ierr)
+{
+    int iOne = 1;
+    int iNegOne = -1;
+    int iTwo = 2;
+    double dNegOne = -1.;
+
+    double nan = C2F(returnanan)();
+
+    int iVal = 0;
+    int nn = 0;
+    double xr = *x1r;
+    double xi = *x1i;
+
+    /* extends cbesi for the case where alpha is negative */
+
+    if (ISNAN(xr) || ISNAN(xi) || ISNAN(*alpha)) 
+    {
+        /* NaN case */
+        C2F(dset)(n, &nan, &yr[0], &iOne);
+        C2F(dset)(n, &nan, &yi[0], &iOne);
+
+        *ierr = 4;
+    } 
+    else if (*alpha >= 0.) 
+    {
+        C2F(zbesh)(&xr, &xi, alpha, kode, k, n, &yr[0], &yi[0], nz, ierr);
+        if (*ierr == 1 || *ierr == 2 || *ierr >= 4) 
+        {
+            C2F(dset)(n, &nan, &yr[0], &iOne);
+            C2F(dset)(n, &nan, &yi[0], &iOne);
+        }
+    }
+    else if (*alpha == (int)(*alpha)) 
+    {
+        double a1 = 0.;
+        /* alpha < 0 and int, */
+        /*  transform to positive value of alpha */
+        if (*alpha - 1 + *n >= 0.) 
+        {
+            /* 0 is between alpha and alpha+n */
+            a1 = 0.;
+            /* Computing MIN */
+            nn = Min(*n, (int) (-(*alpha)));
+        } 
+        else 
+        {
+            a1 = -(*alpha - 1 + *n);
+            nn = *n;
+        }
+        C2F(zbesh)(&xr, &xi, &a1, kode, k, n, &wr[0], &wi[0], nz, ierr);
+        if (*ierr == 1 || *ierr == 2 || *ierr >= 4) 
+        {
+            C2F(dset)(n, &nan, &yr[0], &iOne);
+            C2F(dset)(n, &nan, &yi[0], &iOne);
+        }
+        else
+        {
+            if (*n > nn) 
+            {
+                /* 0 is between alpha and alpha+n */
+                iVal = *n - nn;
+                C2F(dcopy)(&iVal, &wr[0], &iOne, &yr[nn], &iOne);
+                C2F(dcopy)(&iVal, &wi[0], &iOne, &yi[nn], &iOne);
+                C2F(dcopy)(&nn, &wr[1], &iOne, &yr[0], &iOne);
+                C2F(dcopy)(&nn, &wi[1], &iOne, &yi[0], &iOne);
+            } 
+            else 
+            {
+                /* alpha and alpha+n are negative */
+                C2F(dcopy)(n, &wr[0], &iOne, &yr[0], &iOne);
+                C2F(dcopy)(n, &wi[0], &iOne, &yi[0], &iOne);
+            }
+        }
+        iVal = (nn - (((int) fabs(*alpha) + 1) % 2) + 1) / 2;
+        C2F(dscal)(&iVal, &dNegOne, &yr[((int) fabs(*alpha) + 1) % 2], &iTwo);
+        C2F(dscal)(&iVal, &dNegOne, &yi[((int) fabs(*alpha) + 1) % 2], &iTwo);
+    } 
+    else 
+    {
+        int nz1 = 0;
+        double a1 = 0.;
+        /* first alpha is negative non int, transform to positive value of alpha */
+        if (*alpha - 1. + *n >= 0.) 
+        {
+            /* 0 is between alpha and alpha+n */
+            nn = (int) (-(*alpha)) + 1;
+        }
+        else 
+        {
+            nn = *n;
+        }
+
+        /* compute for negative value of alpha+k, transform problem for */
+        /* a1:a1+(nn-1) with a1 positive  a1+k =abs(alpha+nn-k) */
+        a1 = -(*alpha - 1. + nn);
+        C2F(zbesh)(&xr, &xi, &a1, kode, k, n, &wr[0], &wi[0], &nz1, ierr);
+        *nz = Max(nz1, 0);
+        if (*ierr == 0) 
+        {
+            double a = cos(a1 * M_PI);
+            double b = sin(a1 * M_PI);
+            if (*k == 1) 
+            {
+                C2F(wscal)(&nn, &a, &b, &wr[0], &wi[0], &iOne);
+            } 
+            else 
+            {
+                double dNegB = -b;
+                C2F(wscal)(&nn, &a, &dNegB, &wr[0], &wi[0], &iOne);
+            }
+            /* change sign to take into account that sin((a1+k)*pi) and cos((a1+k)*pi) */
+            /* changes sign with k */
+            if (nn >= 2) 
+            {
+                iVal = nn / 2;
+                C2F(dscal)(&iVal, &dNegOne, &wr[1], &iTwo);
+                C2F(dscal)(&iVal, &dNegOne, &wi[1], &iTwo);
+            }
+        } 
+        else if (*ierr == 1 || *ierr == 2 || *ierr >= 4) 
+        {
+            C2F(dset)(&nn, &nan, &wr[0], &iOne);
+            C2F(dset)(&nn, &nan, &wi[0], &iOne);
+        }
+
+        /* store the result in the correct order */
+        C2F(dcopy)(&nn, &wr[0], &iOne, &yr[0], &iOne);
+        C2F(dcopy)(&nn, &wi[0], &iOne, &yi[0], &iOne);
+
+        /* compute for positive value of alpha+k is any */
+        if (*n > nn) 
+        {
+            int ier = 0;
+            a1 = 1. - a1;
+            iVal = *n - nn;
+            C2F(zbesh)(&xr, &xi, &a1, kode, k, &iVal, &yr[nn], &yi[nn], nz, &ier);
+            if (ier == 1 || ier == 2 || ier >= 4) 
+            {
+                iVal = *n - nn;
+                C2F(dset)(&iVal, &nan, &yr[nn], &iOne);
+                C2F(dset)(&iVal, &nan, &yi[nn], &iOne);
+            }
+            *ierr = Max(*ierr, ier);
+        }
+    }
+    return 0;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/special_functions/src/c/zbeshv.h b/scilab/modules/special_functions/src/c/zbeshv.h
new file mode 100644 (file)
index 0000000..13f6f4e
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2011 - 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 __ZEBSV_H__
+#define __ZEBSV_H__
+
+int zbeshv(double *xr, double *xi, int *nx, 
+    double *alpha, int *na, int *kode, int *k, double 
+    *yr, double *yi, double *wr, double *wi, int *ierr);
+
+#endif /* __ZEBSV_H__ */
+/*--------------------------------------------------------------------------*/
index 570f64d..910f59b 100644 (file)
@@ -85,10 +85,18 @@ lib /DEF:&quot;$(InputDir)output_stream_Import.def&quot; /SUBSYSTEM:WINDOWS /MAC
                <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
                <File RelativePath=".\special_functions_f.rc"/></Filter>
                <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
+               <File RelativePath=".\dbesig.f"/>
+               <File RelativePath=".\dbesjg.f"/>
+               <File RelativePath=".\dbeskg.f"/>
+               <File RelativePath=".\dbesyg.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_calerf.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_dlgamma.f"/>
                <File RelativePath="..\..\sci_gateway\fortran\sci_f_gamma.f"/>
-               <File RelativePath="..\..\sci_gateway\fortran\sci_f_lgamma.f"/></Filter>
+               <File RelativePath="..\..\sci_gateway\fortran\sci_f_lgamma.f"/>
+               <File RelativePath=".\zbesig.f"/>
+               <File RelativePath=".\zbesjg.f"/>
+               <File RelativePath=".\zbeskg.f"/>
+               <File RelativePath=".\zbesyg.f"/></Filter>
                <File RelativePath="..\..\..\..\bin\blasplus.lib"/>
                <File RelativePath="..\..\..\..\bin\lapack.lib"/>
                <File RelativePath="..\..\Makefile.am"/>
index 085bd2d..f62658f 100644 (file)
@@ -278,12 +278,28 @@ copy special_functions_f_header.def+special_functions_f.vcdef special_functions_
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_dlgamma.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_gamma.c" />
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_lgamma.c" />
+    <ClCompile Include="dbesig.c" />
+    <ClCompile Include="dbesjg.c" />
+    <ClCompile Include="dbeskg.c" />
+    <ClCompile Include="dbesyg.c" />
+    <ClCompile Include="zbesig.c" />
+    <ClCompile Include="zbesjg.c" />
+    <ClCompile Include="zbeskg.c" />
+    <ClCompile Include="zbesyg.c" />
   </ItemGroup>
   <ItemGroup>
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_calerf.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_dlgamma.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_gamma.f" />
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_lgamma.f" />
+    <f2c_rule Include="dbesig.f" />
+    <f2c_rule Include="dbesjg.f" />
+    <f2c_rule Include="dbeskg.f" />
+    <f2c_rule Include="dbesyg.f" />
+    <f2c_rule Include="zbesig.f" />
+    <f2c_rule Include="zbesjg.f" />
+    <f2c_rule Include="zbeskg.f" />
+    <f2c_rule Include="zbesyg.f" />
   </ItemGroup>
   <ItemGroup>
     <None Include="LibScilab_Import.def" />
index f278be1..3f75677 100644 (file)
     <ClCompile Include="..\..\sci_gateway\fortran\sci_f_lgamma.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="dbesig.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="dbesjg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="dbeskg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="dbesyg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="zbesig.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="zbesjg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="zbeskg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="zbesyg.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_calerf.f">
     <f2c_rule Include="..\..\sci_gateway\fortran\sci_f_lgamma.f">
       <Filter>Fortran files</Filter>
     </f2c_rule>
+    <f2c_rule Include="dbesig.f">
+      <Filter>Fortran files</Filter>
+    </f2c_rule>
+    <f2c_rule Include="dbesjg.f">
+      <Filter>Fortran files</Filter>
+    </f2c_rule>
+    <f2c_rule Include="dbeskg.f">
+      <Filter>Fortran files</Filter>
+    </f2c_rule>
+    <f2c_rule Include="dbesyg.f">
+      <Filter>Fortran files</Filter>
+    </f2c_rule>
+    <f2c_rule Include="zbesig.f">
+      <Filter>Fortran files</Filter>
+    </f2c_rule>
+    <f2c_rule Include="zbesjg.f">
+      <Filter>Fortran files</Filter>
+    </f2c_rule>
+    <f2c_rule Include="zbeskg.f">
+      <Filter>Fortran files</Filter>
+    </f2c_rule>
+    <f2c_rule Include="zbesyg.f">
+      <Filter>Fortran files</Filter>
+    </f2c_rule>
   </ItemGroup>
   <ItemGroup>
     <None Include="LibScilab_Import.def">
diff --git a/scilab/modules/special_functions/tests/nonreg_tests/bug_7901.dia.ref b/scilab/modules/special_functions/tests/nonreg_tests/bug_7901.dia.ref
new file mode 100644 (file)
index 0000000..f4e7b0e
--- /dev/null
@@ -0,0 +1,22 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Allan CORNET
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- JVM NOT MANDATORY -->
+//
+// <-- Non-regression test for bug 7901 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7901
+//
+// besselh.tst failed on Windows
+alpha = 0;
+x = 0;
+yref = [%nan + %nan * %i];
+y = besselh(alpha , x);
+assert_checkequal(isreal(y), %F);
+assert_checkequal(imag(y), %nan);
+assert_checkequal(real(y), %nan);
diff --git a/scilab/modules/special_functions/tests/nonreg_tests/bug_7901.tst b/scilab/modules/special_functions/tests/nonreg_tests/bug_7901.tst
new file mode 100644 (file)
index 0000000..3fc4481
--- /dev/null
@@ -0,0 +1,23 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2011 - DIGITEO - Allan CORNET
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- JVM NOT MANDATORY -->
+//
+// <-- Non-regression test for bug 7901 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7901
+//
+// besselh.tst failed on Windows
+
+alpha = 0;
+x = 0;
+yref = [%nan + %nan * %i];
+y = besselh(alpha , x);
+assert_checkequal(isreal(y), %F);
+assert_checkequal(imag(y), %nan);
+assert_checkequal(real(y), %nan);