From b9cfdca438347fe4d28f7caff3cb7b382e455d3a Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 19 Apr 2017 14:57:49 +0530 Subject: Merged Shamik's work --- .../elementaryFunctions/Trigonometry/cosd/dcosda.c | 14 ++ .../elementaryFunctions/Trigonometry/cosd/dcosds.c | 11 ++ .../elementaryFunctions/Trigonometry/cosd/scosda.c | 9 ++ .../elementaryFunctions/Trigonometry/cosd/scosds.c | 11 ++ .../elementaryFunctions/Trigonometry/cotd/dcotda.c | 16 +++ .../elementaryFunctions/Trigonometry/cotd/dcotds.c | 9 ++ .../elementaryFunctions/Trigonometry/cotd/scotda.c | 9 ++ .../elementaryFunctions/Trigonometry/cotd/scotds.c | 7 + .../elementaryFunctions/Trigonometry/coth/ccotha.c | 12 ++ .../elementaryFunctions/Trigonometry/coth/ccoths.c | 14 ++ .../elementaryFunctions/Trigonometry/coth/dcotha.c | 14 ++ .../elementaryFunctions/Trigonometry/coth/dcoths.c | 10 ++ .../elementaryFunctions/Trigonometry/coth/scotha.c | 14 ++ .../elementaryFunctions/Trigonometry/coth/scoths.c | 10 ++ .../elementaryFunctions/Trigonometry/coth/zcotha.c | 11 ++ .../elementaryFunctions/Trigonometry/coth/zcoths.c | 14 ++ .../c/elementaryFunctions/Trigonometry/csc/ccsca.c | 11 ++ .../c/elementaryFunctions/Trigonometry/csc/ccscs.c | 16 +++ .../c/elementaryFunctions/Trigonometry/csc/dcsca.c | 10 ++ .../c/elementaryFunctions/Trigonometry/csc/dcscs.c | 9 ++ .../c/elementaryFunctions/Trigonometry/csc/scsca.c | 10 ++ .../c/elementaryFunctions/Trigonometry/csc/scscs.c | 9 ++ .../c/elementaryFunctions/Trigonometry/csc/zcsca.c | 11 ++ .../c/elementaryFunctions/Trigonometry/csc/zcscs.c | 19 +++ .../elementaryFunctions/Trigonometry/cscd/ccscda.c | 12 ++ .../elementaryFunctions/Trigonometry/cscd/ccscds.c | 17 +++ .../elementaryFunctions/Trigonometry/cscd/dcscda.c | 15 ++ .../elementaryFunctions/Trigonometry/cscd/dcscds.c | 11 ++ .../elementaryFunctions/Trigonometry/cscd/scscda.c | 10 ++ .../elementaryFunctions/Trigonometry/cscd/scscds.c | 10 ++ .../elementaryFunctions/Trigonometry/cscd/zcscda.c | 12 ++ .../elementaryFunctions/Trigonometry/cscd/zcscds.c | 17 +++ .../elementaryFunctions/Trigonometry/csch/ccscha.c | 11 ++ .../elementaryFunctions/Trigonometry/csch/ccschs.c | 14 ++ .../elementaryFunctions/Trigonometry/csch/dcscha.c | 8 ++ .../elementaryFunctions/Trigonometry/csch/dcschs.c | 9 ++ .../elementaryFunctions/Trigonometry/csch/scscha.c | 8 ++ .../elementaryFunctions/Trigonometry/csch/scschs.c | 9 ++ .../elementaryFunctions/Trigonometry/csch/zcscha.c | 11 ++ .../elementaryFunctions/Trigonometry/csch/zcschs.c | 14 ++ .../c/elementaryFunctions/Trigonometry/sec/cseca.c | 11 ++ .../c/elementaryFunctions/Trigonometry/sec/csecs.c | 13 ++ .../c/elementaryFunctions/Trigonometry/sec/dseca.c | 11 ++ .../c/elementaryFunctions/Trigonometry/sec/dsecs.c | 7 + .../c/elementaryFunctions/Trigonometry/sec/sseca.c | 8 ++ .../c/elementaryFunctions/Trigonometry/sec/ssecs.c | 7 + .../c/elementaryFunctions/Trigonometry/sec/zseca.c | 11 ++ .../c/elementaryFunctions/Trigonometry/sec/zsecs.c | 57 ++++++++ .../elementaryFunctions/Trigonometry/secd/dsecda.c | 11 ++ .../elementaryFunctions/Trigonometry/secd/dsecds.c | 8 ++ .../elementaryFunctions/Trigonometry/secd/ssecda.c | 9 ++ .../elementaryFunctions/Trigonometry/secd/ssecds.c | 7 + .../elementaryFunctions/Trigonometry/sech/csecha.c | 11 ++ .../elementaryFunctions/Trigonometry/sech/csechs.c | 15 ++ .../elementaryFunctions/Trigonometry/sech/dsecha.c | 10 ++ .../elementaryFunctions/Trigonometry/sech/dsechs.c | 10 ++ .../elementaryFunctions/Trigonometry/sech/ssecha.c | 10 ++ .../elementaryFunctions/Trigonometry/sech/ssechs.c | 10 ++ .../elementaryFunctions/Trigonometry/sech/zsecha.c | 11 ++ .../elementaryFunctions/Trigonometry/sech/zsechs.c | 15 ++ .../discrete_mathematics/factor/dfactors.c | 31 ++++ .../discrete_mathematics/factor/sfactors.c | 31 ++++ .../discrete_mathematics/factorial/dfactoriala.c | 12 ++ .../discrete_mathematics/factorial/dfactorials.c | 24 ++++ .../discrete_mathematics/factorial/sfactoriala.c | 12 ++ .../discrete_mathematics/factorial/sfactorials.c | 23 +++ .../discrete_mathematics/primes/dprimess.c | 24 ++++ .../discrete_mathematics/primes/sprimess.c | 24 ++++ 2.3-1/src/c/elementaryFunctions/float/dfloata.c | 7 + 2.3-1/src/c/elementaryFunctions/float/dfloats.c | 5 + 2.3-1/src/c/elementaryFunctions/float/i16floata.c | 6 + 2.3-1/src/c/elementaryFunctions/float/i16floats.c | 5 + 2.3-1/src/c/elementaryFunctions/float/i8floata.c | 6 + 2.3-1/src/c/elementaryFunctions/float/i8floats.c | 5 + 2.3-1/src/c/elementaryFunctions/float/sfloata.c | 7 + 2.3-1/src/c/elementaryFunctions/float/sfloats.c | 5 + 2.3-1/src/c/elementaryFunctions/float/u16floata.c | 6 + 2.3-1/src/c/elementaryFunctions/float/u16floats.c | 5 + 2.3-1/src/c/elementaryFunctions/float/u8floata.c | 6 + 2.3-1/src/c/elementaryFunctions/float/u8floats.c | 5 + .../src/c/elementaryFunctions/includes/base2dec.h | 28 ++++ 2.3-1/src/c/elementaryFunctions/includes/bin2dec.h | 37 +++++ 2.3-1/src/c/elementaryFunctions/includes/cosd.h | 28 ++++ 2.3-1/src/c/elementaryFunctions/includes/cotd.h | 29 ++++ 2.3-1/src/c/elementaryFunctions/includes/coth.h | 37 +++++ 2.3-1/src/c/elementaryFunctions/includes/csc.h | 36 +++++ 2.3-1/src/c/elementaryFunctions/includes/cscd.h | 37 +++++ 2.3-1/src/c/elementaryFunctions/includes/csch.h | 38 +++++ .../src/c/elementaryFunctions/includes/dec2base.h | 29 ++++ 2.3-1/src/c/elementaryFunctions/includes/dec2bin.h | 36 +++++ 2.3-1/src/c/elementaryFunctions/includes/dec2hex.h | 38 +++++ 2.3-1/src/c/elementaryFunctions/includes/dec2oct.h | 37 +++++ 2.3-1/src/c/elementaryFunctions/includes/factor.h | 27 ++++ .../src/c/elementaryFunctions/includes/factorial.h | 37 +++++ 2.3-1/src/c/elementaryFunctions/includes/float.h | 54 +++++++ 2.3-1/src/c/elementaryFunctions/includes/hex2dec.h | 27 ++++ 2.3-1/src/c/elementaryFunctions/includes/interp1.h | 38 +++++ 2.3-1/src/c/elementaryFunctions/includes/oct2dec.h | 37 +++++ 2.3-1/src/c/elementaryFunctions/includes/primes.h | 28 ++++ 2.3-1/src/c/elementaryFunctions/includes/sec.h | 37 +++++ 2.3-1/src/c/elementaryFunctions/includes/secd.h | 28 ++++ 2.3-1/src/c/elementaryFunctions/includes/sech.h | 38 +++++ .../elementaryFunctions/interfaces/int_base2dec.h | 27 ++++ .../c/elementaryFunctions/interfaces/int_bin2dec.h | 37 +++++ .../c/elementaryFunctions/interfaces/int_cosd.h | 28 ++++ .../c/elementaryFunctions/interfaces/int_cotd.h | 28 ++++ .../c/elementaryFunctions/interfaces/int_coth.h | 32 +++++ .../src/c/elementaryFunctions/interfaces/int_csc.h | 32 +++++ .../c/elementaryFunctions/interfaces/int_cscd.h | 32 +++++ .../c/elementaryFunctions/interfaces/int_csch.h | 32 +++++ .../elementaryFunctions/interfaces/int_dec2base.h | 35 +++++ .../c/elementaryFunctions/interfaces/int_dec2bin.h | 48 +++++++ .../c/elementaryFunctions/interfaces/int_dec2hex.h | 35 +++++ .../c/elementaryFunctions/interfaces/int_dec2oct.h | 36 +++++ .../c/elementaryFunctions/interfaces/int_factor.h | 29 ++++ .../elementaryFunctions/interfaces/int_factorial.h | 31 ++++ .../c/elementaryFunctions/interfaces/int_float.h | 38 +++++ .../c/elementaryFunctions/interfaces/int_hex2dec.h | 26 ++++ .../c/elementaryFunctions/interfaces/int_interp1.h | 35 +++++ .../c/elementaryFunctions/interfaces/int_oct2dec.h | 35 +++++ .../c/elementaryFunctions/interfaces/int_primes.h | 29 ++++ .../src/c/elementaryFunctions/interfaces/int_sec.h | 34 +++++ .../c/elementaryFunctions/interfaces/int_secd.h | 28 ++++ .../c/elementaryFunctions/interfaces/int_sech.h | 32 +++++ .../elementaryFunctions/interpolation/dinterp1s.c | 26 ++++ .../radix_conversions/base2dec/dbase2decs.c | 21 +++ .../radix_conversions/base2dec/gbase2decs.c | 160 +++++++++++++++++++++ .../radix_conversions/bin2dec/dbin2deca.c | 10 ++ .../radix_conversions/bin2dec/dbin2decs.c | 21 +++ .../radix_conversions/bin2dec/i16bin2deca.c | 10 ++ .../radix_conversions/bin2dec/i16bin2decs.c | 21 +++ .../radix_conversions/bin2dec/i8bin2deca.c | 10 ++ .../radix_conversions/bin2dec/i8bin2decs.c | 21 +++ .../radix_conversions/bin2dec/u16bin2deca.c | 10 ++ .../radix_conversions/bin2dec/u16bin2decs.c | 21 +++ .../radix_conversions/bin2dec/u8bin2deca.c | 10 ++ .../radix_conversions/bin2dec/u8bin2decs.c | 21 +++ .../radix_conversions/dec2base/ddec2basea.c | 10 ++ .../radix_conversions/dec2base/ddec2bases.c | 60 ++++++++ .../radix_conversions/dec2base/sdec2basea.c | 10 ++ .../radix_conversions/dec2base/sdec2bases.c | 34 +++++ .../radix_conversions/dec2bin/ddec2bina.c | 10 ++ .../radix_conversions/dec2bin/ddec2bins.c | 39 +++++ .../radix_conversions/dec2bin/i16dec2bina.c | 10 ++ .../radix_conversions/dec2bin/i16dec2bins.c | 32 +++++ .../radix_conversions/dec2bin/i8dec2bina.c | 10 ++ .../radix_conversions/dec2bin/i8dec2bins.c | 32 +++++ .../radix_conversions/dec2bin/u16dec2bina.c | 10 ++ .../radix_conversions/dec2bin/u16dec2bins.c | 32 +++++ .../radix_conversions/dec2bin/u8dec2bina.c | 10 ++ .../radix_conversions/dec2bin/u8dec2bins.c | 32 +++++ .../radix_conversions/dec2hex/ddec2hexa.c | 10 ++ .../radix_conversions/dec2hex/ddec2hexs.c | 39 +++++ .../radix_conversions/dec2hex/i16dec2hexa.c | 10 ++ .../radix_conversions/dec2hex/i16dec2hexs.c | 38 +++++ .../radix_conversions/dec2hex/i8dec2hexa.c | 10 ++ .../radix_conversions/dec2hex/i8dec2hexs.c | 39 +++++ .../radix_conversions/dec2hex/u16dec2hexa.c | 10 ++ .../radix_conversions/dec2hex/u16dec2hexs.c | 38 +++++ .../radix_conversions/dec2hex/u8dec2hexa.c | 10 ++ .../radix_conversions/dec2hex/u8dec2hexs.c | 38 +++++ .../radix_conversions/dec2oct/ddec2octa.c | 9 ++ .../radix_conversions/dec2oct/ddec2octs.c | 27 ++++ .../radix_conversions/dec2oct/i16dec2octa.c | 10 ++ .../radix_conversions/dec2oct/i16dec2octs.c | 27 ++++ .../radix_conversions/dec2oct/i8dec2octa.c | 9 ++ .../radix_conversions/dec2oct/i8dec2octs.c | 27 ++++ .../radix_conversions/dec2oct/u16dec2octa.c | 9 ++ .../radix_conversions/dec2oct/u16dec2octs.c | 27 ++++ .../radix_conversions/dec2oct/u8dec2octa.c | 9 ++ .../radix_conversions/dec2oct/u8dec2octs.c | 27 ++++ .../radix_conversions/hex2dec/dhex2decs.c | 21 +++ .../radix_conversions/hex2dec/ghex2decs.c | 81 +++++++++++ .../radix_conversions/oct2dec/doct2deca.c | 10 ++ .../radix_conversions/oct2dec/doct2decs.c | 21 +++ .../radix_conversions/oct2dec/i16oct2deca.c | 10 ++ .../radix_conversions/oct2dec/i16oct2decs.c | 21 +++ .../radix_conversions/oct2dec/i8oct2deca.c | 10 ++ .../radix_conversions/oct2dec/i8oct2decs.c | 21 +++ .../radix_conversions/oct2dec/u16oct2deca.c | 10 ++ .../radix_conversions/oct2dec/u16oct2decs.c | 21 +++ .../radix_conversions/oct2dec/u8oct2deca.c | 10 ++ .../radix_conversions/oct2dec/u8oct2decs.c | 21 +++ .../special_functions/gamma/dgammas.c | 52 +++++++ 2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c | 2 +- 2.3-1/src/c/string/convstr/gconvstrs.c | 19 ++- 2.3-1/src/c/string/includes/convstr.h | 4 +- 2.3-1/src/c/string/includes/strrchr.h | 26 ++++ 2.3-1/src/c/string/includes/strrev.h | 27 ++++ 2.3-1/src/c/string/includes/strsubst.h | 27 ++++ 2.3-1/src/c/string/interfaces/int_convstr.h | 6 +- 2.3-1/src/c/string/interfaces/int_strrchr.h | 25 ++++ 2.3-1/src/c/string/interfaces/int_strrev.h | 25 ++++ 2.3-1/src/c/string/interfaces/int_strsubst.h | 28 ++++ 2.3-1/src/c/string/strrchr/gstrrchra.c | 21 +++ 2.3-1/src/c/string/strrev/gstrreva.c | 15 ++ 2.3-1/src/c/string/strsubst/gstrsubsta.c | 57 ++++++++ 197 files changed, 4148 insertions(+), 8 deletions(-) create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccoths.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcoths.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scoths.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcoths.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccsca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccscs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcsca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcscs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scsca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scscs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcsca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcscs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccscha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccschs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcscha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcschs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scscha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scschs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcscha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcschs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/cseca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/csecs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dseca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dsecs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/sseca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/ssecs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zseca.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zsecs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecda.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecds.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csechs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsechs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssechs.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c create mode 100644 2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsechs.c create mode 100644 2.3-1/src/c/elementaryFunctions/discrete_mathematics/factor/dfactors.c create mode 100644 2.3-1/src/c/elementaryFunctions/discrete_mathematics/factor/sfactors.c create mode 100644 2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/dfactoriala.c create mode 100644 2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/dfactorials.c create mode 100644 2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/sfactoriala.c create mode 100644 2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/sfactorials.c create mode 100644 2.3-1/src/c/elementaryFunctions/discrete_mathematics/primes/dprimess.c create mode 100644 2.3-1/src/c/elementaryFunctions/discrete_mathematics/primes/sprimess.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/dfloata.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/dfloats.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/i16floata.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/i16floats.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/i8floata.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/i8floats.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/sfloata.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/sfloats.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/u16floata.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/u16floats.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/u8floata.c create mode 100644 2.3-1/src/c/elementaryFunctions/float/u8floats.c create mode 100644 2.3-1/src/c/elementaryFunctions/includes/base2dec.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/bin2dec.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/cosd.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/cotd.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/coth.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/csc.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/cscd.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/csch.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/dec2base.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/dec2bin.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/dec2hex.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/dec2oct.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/factor.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/factorial.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/float.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/hex2dec.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/interp1.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/oct2dec.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/primes.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/sec.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/secd.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/sech.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_base2dec.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_bin2dec.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_cosd.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_cotd.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_coth.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_csc.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_cscd.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_csch.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_dec2base.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_dec2bin.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_dec2hex.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_dec2oct.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_factor.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_factorial.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_float.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_hex2dec.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_interp1.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_oct2dec.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_primes.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_sec.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_secd.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_sech.h create mode 100644 2.3-1/src/c/elementaryFunctions/interpolation/dinterp1s.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2bases.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2basea.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2base/sdec2bases.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bina.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/ddec2bins.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bina.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/i16dec2bins.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bina.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/i8dec2bins.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bina.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/u16dec2bins.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bina.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2bin/u8dec2bins.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/ddec2hexs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/i16dec2hexs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/i8dec2hexs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/u16dec2hexs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2hex/u8dec2hexs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/i16dec2octs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/i8dec2octs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/u16dec2octs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octa.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/dec2oct/u8dec2octs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/hex2dec/dhex2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c create mode 100644 2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2decs.c create mode 100644 2.3-1/src/c/elementaryFunctions/special_functions/gamma/dgammas.c create mode 100644 2.3-1/src/c/string/includes/strrchr.h create mode 100644 2.3-1/src/c/string/includes/strrev.h create mode 100644 2.3-1/src/c/string/includes/strsubst.h create mode 100644 2.3-1/src/c/string/interfaces/int_strrchr.h create mode 100644 2.3-1/src/c/string/interfaces/int_strrev.h create mode 100644 2.3-1/src/c/string/interfaces/int_strsubst.h create mode 100644 2.3-1/src/c/string/strrchr/gstrrchra.c create mode 100644 2.3-1/src/c/string/strrev/gstrreva.c create mode 100644 2.3-1/src/c/string/strsubst/gstrsubsta.c (limited to '2.3-1/src') diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c new file mode 100644 index 00000000..b48876e3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c @@ -0,0 +1,14 @@ +#include "cosd.h" +#include + +void dcosda(double* in,int size,double* out) +{ + double val=0.0; + val =3.14159265/180.0; + int i=0; + for (i=0;i +#include "cos.h" +#include "cosd.h" + +double dcosds(double in) +{ + if(cos((M_PI/180.0)*in)==0.0) + return 0.0; + else + return (cos((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c new file mode 100644 index 00000000..5224899b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c @@ -0,0 +1,9 @@ +#include "cos.h" +#include "cosd.h" + +void scosda(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = scosds(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c new file mode 100644 index 00000000..e99a1952 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c @@ -0,0 +1,11 @@ +#include +#include "cosd.h" +#include "cos.h" + +float scosds(float in) +{ + if(cosf((M_PI/180.0)*in)==0.0) + return 0.0; + else + return (cosf((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c new file mode 100644 index 00000000..3cf032a1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c @@ -0,0 +1,16 @@ +#include "cotd.h" +#include +#define PI 3.14159265 + +void dcotda(double* in,int size,double* out) +{ + double val; + int i=0; + val = PI / 180.0; + for(i=0;i +#include "cotd.h" + +double dcotds(double in) +{ +if(in==0) +printf("Inf\n"); + return (1/tan((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotda.c new file mode 100644 index 00000000..fd5a1e11 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotda.c @@ -0,0 +1,9 @@ + +#include "cotd.h" + +void scotda(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = scosds(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotds.c new file mode 100644 index 00000000..d635dbcd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cotd/scotds.c @@ -0,0 +1,7 @@ +#include +#include "cotd.h" + +float scotds(float in) +{ + return (1/tanf((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c new file mode 100644 index 00000000..4e794512 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/ccotha.c @@ -0,0 +1,12 @@ +#include "coth.h" +#include + +void ccotha(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "coth.h" +#include +#include "tanh.h" +#include "floatComplex.h" +#include "division.h" + +floatComplex ccoths(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0), ctanhs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c new file mode 100644 index 00000000..f6304f58 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/dcotha.c @@ -0,0 +1,14 @@ +#include "coth.h" +#include + +void dcotha(double* in,int size,double* out) +{ + double val; + int i=0; + for(i=0;i +#include "coth.h" +#include "cosh.h" +#include "cos.h" +#include "sinh.h" +#include "sin.h" + +double dcoths(double in) { + return (cosh(in)/sinh(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c new file mode 100644 index 00000000..3fdf37f7 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/scotha.c @@ -0,0 +1,14 @@ +#include "coth.h" +#include + +void scotha(float* in,int size,float* out) +{ + float val; + int i=0; + for(i=0;i +#include "coth.h" +#include "cosh.h" +#include "cos.h" +#include "sinh.h" +#include "sin.h" + +float scoths(float in) { + return (cosh(in)/sinh(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c new file mode 100644 index 00000000..dcbb2844 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/coth/zcotha.c @@ -0,0 +1,11 @@ +#include "coth.h" +#include + +void zcotha(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcoths(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),ztanhs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccsca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccsca.c new file mode 100644 index 00000000..5f5504a5 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/ccsca.c @@ -0,0 +1,11 @@ +#include "csc.h" +#include + +void ccsca(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "floatComplex.h" +#include "division.h" + +floatComplex ccscs(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),csins(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcsca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcsca.c new file mode 100644 index 00000000..eeedea52 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/dcsca.c @@ -0,0 +1,10 @@ +#include "csc.h" + +void dcsca(double* in,int size,double* out) +{ + int i = 0; + for (i = 0;i + +double dcscs(double in) +{ + double out; + out=1/sin(in); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scsca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scsca.c new file mode 100644 index 00000000..3e6963ac --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/scsca.c @@ -0,0 +1,10 @@ +#include "csc.h" + +void scsca(float* in,int size,float* out) +{ + int i = 0; + for (i = 0;i + +float scscs(float in) +{ + float out; + out=1/sin(in); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcsca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcsca.c new file mode 100644 index 00000000..4b8cdad6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csc/zcsca.c @@ -0,0 +1,11 @@ +#include "csc.h" +#include + +void zcsca(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcscs(doubleComplex z) +{ + doubleComplex out; + //out = zrdivs(DoubleComplex(1,0),zsins(z)); + double real = zreals(z); + double imag = zimags(z); + printf("%d , %d",real,imag); +return zrdivs(1+0*%i,(DoubleComplex(dsins(real) * dcoshs(imag), dcoss(real) * dsinhs(imag)))); + //return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c new file mode 100644 index 00000000..d18d3c71 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/ccscda.c @@ -0,0 +1,12 @@ +#include "csc.h" +#include "cscd.h" +#include + +void ccscda(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "cscd.h" +#include "floatComplex.h" +#include "division.h" + +floatComplex ccscds(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),csins(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c new file mode 100644 index 00000000..43e00430 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/dcscda.c @@ -0,0 +1,15 @@ +#include "cscd.h" +#include +#define PI 3.14159265 + +void dcscda(double* in,int size,double* out) +{ + double val; + int i=0; + val = PI / 180.0; + for(i=0;i + +double dcscds(double in) +{ + double val; + val = (M_PI) / 180.0; + double out; + out=1/sin(in*val); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c new file mode 100644 index 00000000..761d9413 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/scscda.c @@ -0,0 +1,10 @@ +#include "cscd.h" + +void scscda(float* in,int size,float* out) +{ + int i = 0; + for (i = 0;i + +float scscds(float in) +{ + float out,val; + val=(M_PI)/180.0; + out=1/sin(in*val); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c new file mode 100644 index 00000000..02f9e3b2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/cscd/zcscda.c @@ -0,0 +1,12 @@ +#include "csc.h" +#include "cscd.h" +#include + +void zcscda(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "cscd.h" +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcscds(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),zsins(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccscha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccscha.c new file mode 100644 index 00000000..02a9ec1d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/ccscha.c @@ -0,0 +1,11 @@ +#include "csch.h" +#include + +void ccscha(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "floatComplex.h" +#include "division.h" + +floatComplex ccschs(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),csinhs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcscha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcscha.c new file mode 100644 index 00000000..ce87b6f8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcscha.c @@ -0,0 +1,8 @@ +#include "csch.h" + +void dcscha(double* in, int size, double* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = dcschs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcschs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcschs.c new file mode 100644 index 00000000..3b22544f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/dcschs.c @@ -0,0 +1,9 @@ +#include "csch.h" +#include + +double dcschs(double in) +{ + double out; + out=1/sinh(in); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scscha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scscha.c new file mode 100644 index 00000000..880ffaae --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scscha.c @@ -0,0 +1,8 @@ +#include "csch.h" + +void scscha(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = scschs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scschs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scschs.c new file mode 100644 index 00000000..8cd4e628 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/scschs.c @@ -0,0 +1,9 @@ +#include "csch.h" +#include + +float scschs(float in) +{ + float out; + out=1/sinh(in); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcscha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcscha.c new file mode 100644 index 00000000..ae659dec --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/csch/zcscha.c @@ -0,0 +1,11 @@ +#include "csch.h" +#include + +void zcscha(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zcschs(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),zsinhs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/cseca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/cseca.c new file mode 100644 index 00000000..139360af --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/cseca.c @@ -0,0 +1,11 @@ +#include "sec.h" +#include + +void cseca(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "floatComplex.h" +#include "division.h" + +floatComplex csecs(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),ccoss(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dseca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dseca.c new file mode 100644 index 00000000..986b52f3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/dseca.c @@ -0,0 +1,11 @@ +#include "sec.h" +#include + +void dseca(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "sec.h" + +double dsecs(double in) +{ + return (1/cos(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/sseca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/sseca.c new file mode 100644 index 00000000..f5fd81bc --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/sseca.c @@ -0,0 +1,8 @@ +#include "sec.h" + +void sseca(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = ssecs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/ssecs.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/ssecs.c new file mode 100644 index 00000000..2c9e018f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/ssecs.c @@ -0,0 +1,7 @@ +#include +#include "sec.h" + +float ssecs(float in) +{ + return (1/cos(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zseca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zseca.c new file mode 100644 index 00000000..7a80291f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sec/zseca.c @@ -0,0 +1,11 @@ +#include "sec.h" +#include + +void zseca(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +//#include "doubleComplex.h" +//#include "division.h" +*/ + +/*#include +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" +#include "csc.h" +#include "division.h" +*/ +#include +#include + +/*doubleComplex zsecs(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),zcoss(z)); + return out; +} +*/ +void zsecs(double complex z) +{ + + //double complex out; + /*out = zrdivs(DoubleComplex(1,0),zcoss(z)); + return out; +}*/ + + double complex out = 1.0/(ccos(z)); + if(cimag(out)==0.0) + { + printf("%.7lf\n",creal(out)); + //out=creal(out); + } + else if(creal(out)==0.0) + { + printf("%.7lfi\n",cimag(out)); + //out=cimag(out); + } + else if(creal(out)!=0.0 && cimag(out)<0.0) + { + printf("%.7lf %.7lfi\n",creal(out),cimag(out)); + //out=x; + } + else + { + printf("%.7lf + %.7lfi\n", creal(out), cimag(out)); + //out=x; + } + //return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecda.c new file mode 100644 index 00000000..028595cd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/dsecda.c @@ -0,0 +1,11 @@ +#include "secd.h" +#include + +void dsecda(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "sec.h" +#include "secd.h" + +double dsecds(double in) +{ + return (1/cos((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecda.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecda.c new file mode 100644 index 00000000..6267f943 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecda.c @@ -0,0 +1,9 @@ +#include "sec.h" +#include "secd.h" + +void ssecda(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = ssecds(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecds.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecds.c new file mode 100644 index 00000000..3fabb225 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/secd/ssecds.c @@ -0,0 +1,7 @@ +#include +#include "secd.h" +#include "sec.h" + +float ssecds(float in) { + return (1/cos((M_PI/180.0)*in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c new file mode 100644 index 00000000..dcd76d59 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/csecha.c @@ -0,0 +1,11 @@ +#include "sech.h" +#include + +void csecha(floatComplex* in, int size,floatComplex* out) +{ + int i = 0; + for (i=0;i +#include "cos.h" +#include "cosh.h" +#include "floatComplex.h" +#include "division.h" + +floatComplex csechs(floatComplex z) +{ + + floatComplex out; + out = crdivs(FloatComplex(1,0),ccoshs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c new file mode 100644 index 00000000..cfab81ff --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/dsecha.c @@ -0,0 +1,10 @@ +#include "sech.h" +#include +void dsecha(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "sech.h" +#include "cosh.h" +#include "cos.h" + + +double dsechs(double in) +{ + return (1/cosh(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c new file mode 100644 index 00000000..1d265639 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/ssecha.c @@ -0,0 +1,10 @@ +#include "sech.h" +#include +void ssecha(float* in,int size,float* out) +{ + int i=0; + for(i=0;i +#include "sech.h" +#include "cosh.h" +#include "cos.h" + + +float ssechs(float in) +{ + return (1/cosh(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c new file mode 100644 index 00000000..c48f8dab --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sech/zsecha.c @@ -0,0 +1,11 @@ +#include "sech.h" +#include + +void zsecha(doubleComplex* in, int size,doubleComplex* out) +{ + int i = 0; + for (i=0;i +#include "cos.h" +#include "cosh.h" +#include "doubleComplex.h" +#include "division.h" + +doubleComplex zsechs(doubleComplex z) +{ + + doubleComplex out; + out = zrdivs(DoubleComplex(1,0),zcoshs(z)); + return out; +} diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factor/dfactors.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factor/dfactors.c new file mode 100644 index 00000000..210670bb --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factor/dfactors.c @@ -0,0 +1,31 @@ +# include +# include + +void dfactors(double in,double* out) +{ + int i=0,k=0; + int n=(int)in; + while (n%2 == 0) + { + //printf("%d ", 2); + out[k++]=2; + n = n/2; + } + + for (i = 3; i <= sqrt(n); i = i+2) + { + while (n%i == 0) + { + out[k++]=i; + //printf("%d ", i); + n = n/i; + } + } + + if (n > 2) + { + out[k++]=n; + //printf ("%d ", n); + } +} + diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factor/sfactors.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factor/sfactors.c new file mode 100644 index 00000000..9a37140e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factor/sfactors.c @@ -0,0 +1,31 @@ +# include +# include + +void sfactors(float in,float* out) +{ + int i=0,k=0; + int n=(int)in; + while (n%2 == 0) + { + //printf("%d ", 2); + out[k++]=2; + n = n/2; + } + + for (i = 3; i <= sqrt(n); i = i+2) + { + while (n%i == 0) + { + out[k++]=i; + //printf("%d ", i); + n = n/i; + } + } + + if (n > 2) + { + out[k++]=n; + //printf ("%d ", n); + } +} + diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/dfactoriala.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/dfactoriala.c new file mode 100644 index 00000000..de06aaa2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/dfactoriala.c @@ -0,0 +1,12 @@ +#include "factorial.h" +#include + +void dfactoriala(double* in,int size,double* out) +{ + int i=0; + for (i=0;i +#include +#include "factorial.h" + +double dfactorials(double in) +{ + int i,n; + long long int fact=1; + n=(int)in; + if (n < 0) + printf("Error! Factorial of a negative number doesn't exist."); + else if (n>170) + printf("Inf"); + else + { + for(i=1; i<=n; i++) + { + fact=fact*i; + //printf("\n %lld",fact); + } + } + + return fact; +} diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/sfactoriala.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/sfactoriala.c new file mode 100644 index 00000000..e7d820b2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/factorial/sfactoriala.c @@ -0,0 +1,12 @@ +#include "factorial.h" +#include + +void sfactoriala(float* in,int size,float* out) +{ + int i=0; + for (i=0;i +#include +#include "factorial.h" + +float sfactorials(float in) +{ + int i,n; + long long int fact=1; + n=(int)in; + if (n < 0) + printf("Error! Factorial of a negative number doesn't exist."); + else if(n>170) + printf("Inf"); + else + { + for(i=1; i<=n; i++) + { + fact *= i; + } + } + + return fact; +} diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/primes/dprimess.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/primes/dprimess.c new file mode 100644 index 00000000..5ecb92e1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/primes/dprimess.c @@ -0,0 +1,24 @@ +#include +#include "primes.h" +void dprimess(double in, double* out) +{ + int i=0,j=0,k=0,n=0,counter=0; + n=(int)in; + for(i=2;i<=n;i++) + { + counter=0; + for(j=2;j +#include "primes.h" +void sprimess(float in, float* out) +{ + int i=0,j=0,k=0,n=0,counter=0; + n=(int)in; + for(i=2;i<=n;i++) + { + counter=0; + for(j=2;j +#include "types.h" + + #ifdef __cplusplus + extern "C" { + #endif + +void dseca(double* in,int size,double* out); +double dsecs(double in); +void sseca(float* in,int size,float* out); +float ssecs(float in); + +void zsecs(double complex z); +//void zseca(doubleComplex* in, int size,doubleComplex* out); +floatComplex csecs(floatComplex z); +void cseca(floatComplex* in, int size,floatComplex* out); + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__SEC_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/includes/secd.h b/2.3-1/src/c/elementaryFunctions/includes/secd.h new file mode 100644 index 00000000..bf9c653d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/secd.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __SECD_H__ +#define __SECD_H__ +#include "types.h" + + #ifdef __cplusplus + extern "C" { + #endif + +void dsecda(double* in,int size,double* out); +void ssecda(float* in,int size,float* out); +double dsecds(double in); +float ssecds(float in); + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__SECD_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/includes/sech.h b/2.3-1/src/c/elementaryFunctions/includes/sech.h new file mode 100644 index 00000000..9b85396a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/sech.h @@ -0,0 +1,38 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __SECH_H__ +#define __SECH_H__ +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "types.h" + + #ifdef __cplusplus + extern "C" { + #endif + +void dsecha(double* in,int size,double* out); +double dsechs(double in); +void ssecha(float* in,int size,float* out); +float ssechs(float in); + +void csecha(floatComplex* in,int size,floatComplex* out); +floatComplex csechs(floatComplex in); +void zsecha(doubleComplex* in,int size,doubleComplex* out); +doubleComplex zsechs(doubleComplex in); + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__SECH_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_base2dec.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_base2dec.h new file mode 100644 index 00000000..8d5e68eb --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_base2dec.h @@ -0,0 +1,27 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_base2dec_H__ +#define __INT_base2dec_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define g2d0base2decd0(in,size,base) gbase2decs(in,size[1],base) +#define d0d0base2decd0(in,base) dbase2decs(in,base) +//#define g2d0base2decd2(in,size,out) gbase2deca(in,size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_base2dec_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_bin2dec.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_bin2dec.h new file mode 100644 index 00000000..c8e07b09 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_bin2dec.h @@ -0,0 +1,37 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_bin2dec_H__ +#define __INT_bin2dec_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0bin2decd0(in) dbin2decs(in) +#define i80bin2deci80(in) i8bin2decs(in) +//#define i160bin2deci160(in) i16bin2decs(in) +#define u80bin2decu80(in) u8bin2decs(in) +#define u160bin2decu160(in) u16bin2decs(in) + +#define d2bin2decd2(in,size,out) dbin2deca(in,size[0]*size[1],out) +#define i82bin2deci82(in,size,out) i8bin2deca(in,size[0]*size[1],out) +//#define i162bin2deci162(in,size,out) i16bin2deca(in,size[0]*size[1],out) +#define u82bin2decu82(in,size,out) u8bin2deca(in,size[0]*size[1],out) +#define u162bin2decu162(in,size,out) u16bin2deca(in,size[0]*size[1],out) + + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_bin2dec_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_cosd.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_cosd.h new file mode 100644 index 00000000..9ca9945b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_cosd.h @@ -0,0 +1,28 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_COSD_H__ +#define __INT_COSD_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2cosdd2(in,size,out) dcosda(in,size[1],out) +#define d0cosdd0(in) dcosds(in) +#define s2cosds2(in,size,out) scosda(in,size[1],out) +#define s0cosds0(in) scosds(in) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_COSD_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_cotd.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_cotd.h new file mode 100644 index 00000000..382f7802 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_cotd.h @@ -0,0 +1,28 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_COTD_H__ +#define __INT_COTD_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2cotdd2(in,size,out) dcotda(in,size[1],out) +#define s2cotds2(in,size,out) scotda(in,size[1],out) +#define d0cotdd0(in) dcotds(in) +#define s0cotds0(in) scotds(in) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_COTD_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_coth.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_coth.h new file mode 100644 index 00000000..db8887a3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_coth.h @@ -0,0 +1,32 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_COTH_H__ +#define __INT_COTH_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2cothd2(in,size,out) dcotha(in,size[1],out) +#define s2coths2(in,size,out) scotha(in,size[1],out) +#define d0cothd0(in) dcoths(in) +#define s0coths0(in) scoths(in) +#define z0cothz0(in) zcoths(in) +#define z2cothz2(in,size,out) zcoths(in,size[1],out) +#define c0cothc0(in) ccoths(in) +#define c2cothc2(in,size,out) ccoths(in,size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_COTH_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_csc.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_csc.h new file mode 100644 index 00000000..74038c97 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_csc.h @@ -0,0 +1,32 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_CSC_H__ +#define __INT_CSC_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2cscd2(in,size,out) dcsca(in,size[1],out) +#define d0cscd0(in) dcscs(in) +#define s2cscs2(in,size,out) scsca(in,size[1],out) +#define s0cscs0(in) scscs(in) +#define z2cscz2(in,size,out) zcsca(in,size[1],out) +#define z0cscz0(in) zcscs(in) +#define c2cscc2(in,size,out) ccsca(in,size[1],out) +#define c0cscc0(in) ccscs(in) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_CSC_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_cscd.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_cscd.h new file mode 100644 index 00000000..99bc49a3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_cscd.h @@ -0,0 +1,32 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_CSCD_H__ +#define __INT_CSCD_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2cscdd2(in,size,out) dcscda(in,size[1],out) +#define d0cscdd0(in) dcscds(in) +#define s2cscds2(in,size,out) scscda(in,size[1],out) +#define s0cscds0(in) scscds(in) +#define z0cscdz0(in) zcscds(in) +#define z2cscdz2(in,size,out) zcscds(in,size[1],out) +#define c0cscdc0(in) ccscds(in) +#define c2cscdc2(in,size,out) ccscds(in,size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_CSCD_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_csch.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_csch.h new file mode 100644 index 00000000..ce355895 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_csch.h @@ -0,0 +1,32 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_CSCH_H__ +#define __INT_CSCH_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2cschd2(in,size,out) dcscha(in,size[1],out) +#define d0cschd0(in) dcschs(in) +#define s2cschs2(in,size,out) scscha(in,size[1],out) +#define s0cschs0(in) scschs(in) +#define z0cschz0(in) zcschs(in) +#define z2cschz2(in,size,out) zcschs(in,size[1],out) +#define c0cschc0(in) ccschs(in) +#define c2cschc2(in,size,out) ccschs(in,size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_CSC_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2base.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2base.h new file mode 100644 index 00000000..637f099c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2base.h @@ -0,0 +1,35 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_dec2base_H__ +#define __INT_dec2base_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0d0dec2baseg2(in,base,out) ddec2bases(in,base,0,out) +#define s0d0dec2baseg2(in,base,out) sdec2bases(in,base,0,out) + +#define d2d0dec2baseg2(in,size,out) ddec2basea(in,size[0]*size[1],base,0,out) +#define s2d0dec2baseg2(in,size,out) sdec2basea(in,size[0]*size[1],base,0,out) + +#define d0d0d0dec2baseg2(in,base,n,out) ddec2bases(in,base,n,out) +#define s0d0d0dec2baseg2(in,base,n,out) sdec2bases(in,base,n,out) + +#define d2d0d0dec2baseg2(in,size,base,n,out) ddec2basea(in,size[0]*size[1],base,n,out) +#define s2d0d0dec2baseg2(in,size,base,n,out) sdec2basea(in,size[0]*size[1],base,n,out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_dec2base_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2bin.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2bin.h new file mode 100644 index 00000000..c6f2008b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2bin.h @@ -0,0 +1,48 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_dec2bin_H__ +#define __INT_dec2bin_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0dec2bind2(in,out) ddec2bins(in,0,out) +#define i80dec2bini82(in,out) i8dec2bins(in,0,out) +#define i160dec2bini162(in,out) i16dec2bins(in,0,out) +#define u80dec2binu82(in,out) u8dec2bins(in,0,out) +#define u160dec2binu162(in,out) u16dec2bins(in,0,out) + +#define d2dec2bind2(in,size,out) ddec2bina(in,size[0]*size[1],0,out) +#define i82dec2bini82(in,size,out) i8dec2bina(in,size[0]*size[1],0,out) +#define i162dec2bini162(in,size,out) i16dec2bina(in,size[0]*size[1],0,out) +#define u82dec2binu82(in,size,out) u8dec2bina(in,size[0]*size[1],0,out) +#define u162dec2binu162(in,size,out) u16dec2bina(in,size[0]*size[1],0,out) + +#define d0d0dec2bind2(in,n,out) ddec2bins(in,n,out) +#define i80d0dec2bini82(in,n,out) i8dec2bins(in,n,out) +#define i160d0dec2bini162(in,n,out) i16dec2bins(in,n,out) +#define u80d0dec2binu82(in,n,out) u8dec2bins(in,n,out) +#define u160d0dec2binu162(in,n,out) u16dec2bins(in,n,out) + +#define d2d0dec2bind2(in,size,n,out) ddec2bina(in,size[0]*size[1],n,out) +#define i82d0dec2bini82(in,size,n,out) i8dec2bina(in,size[0]*size[1],n,out) +#define i162d0dec2bini162(in,size,n,out) i16dec2bina(in,size[0]*size[1],n,out) +#define u82d0dec2binu82(in,size,n,out) u8dec2bina(in,size[0]*size[1],n,out) +#define u162d0dec2binu162(in,size,n,out) u16dec2bina(in,size[0]*size[1],n,out) + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_dec2bin_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2hex.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2hex.h new file mode 100644 index 00000000..bed85be1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2hex.h @@ -0,0 +1,35 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_dec2hex_H__ +#define __INT_dec2hex_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0dec2hexg2(in,out) ddec2hexs(in,out) +#define i80dec2hexg2(in,out) i8dec2hexs(in,out) +#define i160dec2hexg2(in,out) i16dec2hexs(in,out) +#define u80dec2hexg2(in,out) u8dec2hexs(in,out) +#define u160dec2hexg2(in,out) u16dec2hexs(in,out) + +#define d2dec2hexg2(in,size,out) ddec2hexa(in,size[0]*size[1],out) +#define i82dec2hexg2(in,size,out) i8dec2hexa(in,size[0]*size[1],out) +#define i162dec2hexg2(in,size,out) i16dec2hexa(in,size[0]*size[1],out) +#define u82dec2hexg2(in,size,out) u8dec2hexa(in,size[0]*size[1],out) +#define u162dec2hexg2(in,size,out) u16dec2hexa(in,size[0]*size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_dec2hex_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2oct.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2oct.h new file mode 100644 index 00000000..5cf61be1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_dec2oct.h @@ -0,0 +1,36 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_dec2oct_H__ +#define __INT_dec2oct_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0dec2octd2(in,out) ddec2octs(in,out) +#define i80dec2octi82(in,out) i8dec2octs(in,out) +#define i160dec2octi162(in,out) i16dec2octs(in,out) +#define u80dec2octu82(in,out) u8dec2octs(in,out) +#define u160dec2octu162(in,out) u16dec2octs(in,out) + +#define d2dec2octd2(in,size,out) ddec2octa(in,size[0]*size[1],out) +#define i82dec2octi82(in,size,out) i8dec2octa(in,size[0]*size[1],out) +#define i162dec2octi162(in,size,out) i16dec2octa(in,size[0]*size[1],out) +#define u82dec2octu82(in,size,out) u8dec2octa(in,size[0]*size[1],out) +#define u162dec2octu162(in,size,out) u16dec2octa(in,size[0]*size[1],out) + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_dec2oct_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_factor.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_factor.h new file mode 100644 index 00000000..5e0991aa --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_factor.h @@ -0,0 +1,29 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_FACTOR_H__ +#define __INT_FACTOR_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0factord2(in,out) dfactors(in,out) +#define s0factors2(in,out) sfactors(in,out) + + + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_FACTOR_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_factorial.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_factorial.h new file mode 100644 index 00000000..446b5135 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_factorial.h @@ -0,0 +1,31 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_FACTORIAL_H__ +#define __INT_FACTORIAL_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0factoriald0(in) dfactorials(in) +#define s0factorials0(in) sfactorials(in) + +#define d2factoriald2(in,size,out) dfactoriala(in,size[0]*size[1],out) +#define s2factorials2(in,size,out) sfactoriala(in,size[0]*size[1],out) + + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_FACTORIAL_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_float.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_float.h new file mode 100644 index 00000000..df9aa395 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_float.h @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Author - Shamik Guha + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_FLOAT_H__ +#define __INT_FLOAT_H__ + +#define s0floats0(in) sfloats(in) + +#define d0floats0(in) dfloats(in) + +#define i80floats0(in) i8floats(in) + +#define u160floats0(in) u16floats(in) + +#define i160floats0(in) i16floats(in) + +#define s2floats2(in,size,out) sfloata(in, size[0]*size[1], out) + +#define d2floats2(in,size,out) dfloata(in, size[0]*size[1], out) + +#define i82floats2(in,size,out) i8floata(in, size[0]*size[1], out) + +#define u162floats2(in,size,out) u16floata(in, size[0]*size[1], out) + +#define i162floats2(in,size,out) i16floata(in, size[0]*size[1], out) + +#endif /* !__INT_FLOAT_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_hex2dec.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_hex2dec.h new file mode 100644 index 00000000..d5589369 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_hex2dec.h @@ -0,0 +1,26 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_hex2dec_H__ +#define __INT_hex2dec_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define g2hex2decd0(in,size) ghex2decs(in,size[1]) +#define d0hex2decd0(in) dhex2decs(in) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_hex2dec_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_interp1.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_interp1.h new file mode 100644 index 00000000..bafe915e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_interp1.h @@ -0,0 +1,35 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_INTERP1_H__ +#define __INT_INTERP1_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2d2d0g2interp1d0(x,size,y,size2,xin,method,size3) dinterp1s(x,size[1],y,size2[1],xin,method,size3[1]) +//#define i80interp1g2(in,out) i8interp1s(in,out) +//#define i160interp1g2(in,out) i16interp1s(in,out) +//#define u80interp1g2(in,out) u8interp1s(in,out) +//#define u160interp1g2(in,out) u16interp1s(in,out) + +//#define d2interp1g2(in,size,out) dinterp1a(in,size[0]*size[1],out) +//#define i82interp1g2(in,size,out) i8interp1a(in,size[0]*size[1],out) +//#define i162interp1g2(in,size,out) i16interp1a(in,size[0]*size[1],out) +//#define u82interp1g2(in,size,out) u8interp1a(in,size[0]*size[1],out) +//#define u162interp1g2(in,size,out) u16interp1a(in,size[0]*size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_interp1_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_oct2dec.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_oct2dec.h new file mode 100644 index 00000000..0f5d1f24 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_oct2dec.h @@ -0,0 +1,35 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_oct2dec_H__ +#define __INT_oct2dec_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0oct2decd0(in) doct2decs(in) +#define i80oct2deci80(in) i8oct2decs(in) +#define i160oct2deci160(in) i16oct2decs(in) +#define u80oct2decu80(in) u8oct2decs(in) +#define u160oct2decu160(in) u16oct2decs(in) + +#define d2oct2decd2(in,size,out) doct2deca(in,size[0]*size[1],out) +#define i82oct2deci82(in,size,out) i8oct2deca(in,size[0]*size[1],out) +#define i162oct2deci162(in,size,out) i16oct2deca(in,size[0]*size[1],out) +#define u82oct2decu82(in,size,out) u8oct2deca(in,size[0]*size[1],out) +#define u162oct2decu162(in,size,out) u16oct2deca(in,size[0]*size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_oct2dec_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_primes.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_primes.h new file mode 100644 index 00000000..d48a6831 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_primes.h @@ -0,0 +1,29 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_PRIMES_H__ +#define __INT_PRIMES_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d0primesd2(in,out) dprimess(in,out) +#define s0primess2(in,out) sprimess(in,out) + + + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_PRIMES_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_sec.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_sec.h new file mode 100644 index 00000000..b07cdfc9 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_sec.h @@ -0,0 +1,34 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_SEC_H__ +#define __INT_SEC_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2secd2(in,size,out) dseca(in,size[1],out) +#define d0secd0(in) dsecs(in) +#define s2secs2(in,size,out) sseca(in,size[1],out) +#define s0secs0(in) ssecs(in) + +#define z2secz2(in,size,out) zseca(in,size[1],out) +#define z0secz0(in) zsecs(in) +#define c2secc2(in,size,out) cseca(in,size[1],out) +#define c0secc0(in) csecs(in) + + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_SEC__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_secd.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_secd.h new file mode 100644 index 00000000..9304eb04 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_secd.h @@ -0,0 +1,28 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_SECD_H__ +#define __INT_SECD_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2secdd2(in,size,out) dsecda(in,size[1],out) +#define d0secdd0(in) dsecds(in) +#define s2secds2(in,size,out) ssecda(in,size[1],out) +#define s0secds0(in) ssecds(in) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_SECD_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_sech.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_sech.h new file mode 100644 index 00000000..1cd42218 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_sech.h @@ -0,0 +1,32 @@ + /* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in + */ +#ifndef __INT_SECH_H__ +#define __INT_SECH_H__ + + #ifdef __cplusplus + extern "C" { + #endif + +#define d2sechd2(in,size,out) dsecha(in,size[1],out) +#define s2sechs2(in,size,out) ssecha(in,size[1],out) +#define d0sechd0(in) dsechs(in) +#define s0sechs0(in) ssechs(in) +#define z0sechz0(in) zsechs(in) +#define z2sechz2(in,size,out) zsechs(in,size[1],out) +#define c0sechc0(in) csechs(in) +#define c2sechc2(in,size,out) csechs(in,size[1],out) + + #ifdef __cplusplus + } /* extern "C" */ + #endif + +#endif /*__INT_SECH_H__*/ diff --git a/2.3-1/src/c/elementaryFunctions/interpolation/dinterp1s.c b/2.3-1/src/c/elementaryFunctions/interpolation/dinterp1s.c new file mode 100644 index 00000000..17aeb876 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interpolation/dinterp1s.c @@ -0,0 +1,26 @@ +#include +#include "interp1.h" +double dinterp1s(double* x, int size, double* y,int size2, double xin, char* method,int size3) +{ + double x0=x[0]; + double x1=x[size-1]; + double y0=y[0]; + double y1=y[size2-1]; + double a = (y1 - y0) / (x1 - x0); + double b = ((-a)*x0) + y0; + double yout = 0.0; + yout=(double) ((a*xin) + b); + return yout; +} + +/* +int main(void) +{ + double x0=3, y0=0, x1=5, y1=8; + double x=4; + double y = linear_interpolation(x0, y0, x1, y1, x); + printf("(%f, %f), (%f, %f) for %f = %f\n", x0, y0, x1, y1, x, y); + return 0; + +} +*/ diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c new file mode 100644 index 00000000..51c42e02 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/base2dec/dbase2decs.c @@ -0,0 +1,21 @@ +#include +#include "base2dec.h" +#include +#include + +double dbase2decs(double in,int base) +{ + int n=0,rem=0, base1=1; + double out=0.0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base1); + n = n / 10 ; + base1 = base1 * base; + } + return out; +} + + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c new file mode 100644 index 00000000..9acf2666 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/base2dec/gbase2decs.c @@ -0,0 +1,160 @@ +#include +#include +#include "base2dec.h" +#include + +double gbase2decs(char* in,int size,int base) +{ + size-=2; + int i=0,val=0,j=0; + double o=0.0; + for(i=0; in[i]!='\0'; i++) + { + //printf("%c \n",in[i]); + switch(in[i]) + { + case '0': + val = 0; + break; + case '1': + val = 1; + break; + case '2': + val = 2; + break; + case '3': + val = 3; + break; + case '4': + val = 4; + break; + case '5': + val = 5; + break; + case '6': + val = 6; + break; + case '7': + val = 7; + break; + case '8': + val = 8; + break; + case '9': + val = 9; + break; + case 'a': + case 'A': + val = 10; + break; + case 'b': + case 'B': + val = 11; + break; + case 'c': + case 'C': + val = 12; + break; + case 'd': + case 'D': + val = 13; + break; + case 'e': + case 'E': + val = 14; + break; + case 'f': + case 'F': + val = 15; + break; + case 'g': + case 'G': + val = 16; + break; + case 'h': + case 'H': + val = 17; + break; + case 'i': + case 'I': + val = 18; + break; + case 'j': + case 'J': + val = 19; + break; + case 'k': + case 'K': + val = 20; + break; + case 'l': + case 'L': + val = 21; + break; + case 'm': + case 'M': + val = 22; + break; + case 'n': + case 'N': + val = 23; + break; + case 'o': + case 'O': + val = 24; + break; + case 'p': + case 'P': + val = 25; + break; + case 'q': + case 'Q': + val = 26; + break; + case 'r': + case 'R': + val = 27; + break; + case 's': + case 'S': + val = 28; + break; + case 't': + case 'T': + val = 29; + break; + case 'u': + case 'U': + val = 30; + break; + case 'v': + case 'V': + val = 31; + break; + case 'w': + case 'W': + val = 32; + break; + case 'x': + case 'X': + val = 33; + break; + case 'y': + case 'Y': + val = 34; + break; + case 'z': + case 'Z': + val = 35; + break; + } + o = o + (val * pow(base, size)); + //printf("%f\n",out[0]); + //o=(int)out[0]; + //o=o/16; + //printf("%d %d %d\n",o,val,(val * pow(16, size))); + //j++; + size--; + } + return o; + } diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c new file mode 100644 index 00000000..9baf4bda --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/dbin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void dbin2deca(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +long double dbin2decs(long double in) +{ + int base=1, rem=0; + long double out=0.0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c new file mode 100644 index 00000000..1ebc973c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i16bin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void i16bin2deca(int16* in,int size,int16* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +int16 i16bin2decs(int16 in) +{ + int base=1, rem=0; + int16 out=0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c new file mode 100644 index 00000000..ad76143e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/i8bin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void i8bin2deca(int8* in,int size,int8* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +int8 i8bin2decs(int8 in) +{ + int base=1, rem=0; + int8 out=0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c new file mode 100644 index 00000000..2a4ac15d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u16bin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void u16bin2deca(uint16* in,int size,uint16* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +uint16 u16bin2decs(uint16 in) +{ + int base=1, rem=0; + uint16 out=0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c new file mode 100644 index 00000000..f775664c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/bin2dec/u8bin2deca.c @@ -0,0 +1,10 @@ +#include "bin2dec.h" + +void u8bin2deca(uint8* in,int size,uint8* out) +{ + int i=0; + for(i=0;i +#include "bin2dec.h" +#include +#include +uint8 u8bin2decs(uint8 in) +{ + int base=1, rem=0; + uint8 out=0; + int in1; + in1=(int)in; + while (in1 != 0) + { + rem = in1 % 10; + out = out + (rem * base); + in1 = in1 / 10 ; + base = base * 2; + } + return out; + // printf("Decimal equivalent is: %f \n",out); +} + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c new file mode 100644 index 00000000..eeadcb76 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/dec2base/ddec2basea.c @@ -0,0 +1,10 @@ +#include "dec2base.h" + +void ddec2basea(double* in,int size,int base,int n,char* out) +{ + int i=0; + for(i=0;i +#include +#include "dec2base.h" +#include + +void ddec2bases(double in,int base,int n,char* out) +{ + int quot; + //printf("%d\n",n); + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + //printf("%d",quot); + while(quot!=0) + { + temp=quot%base; + //printf("%d\n",temp); + if(temp < 10) + { temp = temp + 48; + //printf("%d\n",temp); + } + else + { + temp = temp + 55; + //printf("%d\n",temp); + } + out[i++]=temp; + //printf("%c\n",out[i-1]); + quot = quot/base; + } +//printf("%d\n",i); + if(n>i-1) + { + for(j=i;j<=n;j++) + { out[j]='0'; + //printf(" %c %c \n",out[j],out[i]); + } + } + if(n==0) + { + j=i-1; + n=i; + } + else + j=n-1; + + out[n]='\0'; + //for(k=0;k<=n;k++) + //printf("%c\n",out[k]); + i=0; + while(i +#include +#include "dec2base.h" +#include + +void sdec2bases(float in,int base,int n,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%base; + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + out[i++]=temp; + quot = quot/base; + } + out[i]='\0'; + j=i-1; + i=0; + while(i +#include "dec2bin.h" +#include +void ddec2bins(double in,int n,double* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + for(i=0;ii-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + + i=0; + + while(i +#include "dec2bin.h" +#include +void i16dec2bins(int16 in,int n,int16* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%2; + quotient=quotient/2; + } + if(n>i-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + i=0; + + while(i +#include "dec2bin.h" +#include +void i8dec2bins(int8 in,int n,int8* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%2; + quotient=quotient/2; + } + if(n>i-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + i=0; + + while(i +#include "dec2bin.h" +#include +void u16dec2bins(uint16 in,int n,uint16* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%2; + quotient=quotient/2; + } + if(n>i-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + i=0; + + while(i +#include "dec2bin.h" +#include +void u8dec2bins(uint8 in,int n,uint8* out) +{ + int quotient,i=0,j=0,tmp=0; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%2; + quotient=quotient/2; + } + if(n>i-1) + { + for(j=i;j<=n;j++) + out[j]=0.0; + } + if(n==0) + j=i-1; + else + j=n-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void ddec2hexs(double in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void i16dec2hexs(int16 in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void i8dec2hexs(int8 in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void u16dec2hexs(uint16 in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2hex.h" +#include + +void u8dec2hexs(uint8 in,char* out) +{ + int quot; + int i=0,j=0,k=0,tmp,temp; + quot=(int)in; + while(quot!=0) + { + temp=quot%16; + //To convert integer into character + if(temp < 10) + temp = temp + 48; + else + temp = temp + 55; + + out[i++]=temp; + quot = quot/16; + //printf("%c ",out[i-1]); + } + out[i]='\0'; + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void ddec2octs(double in,double* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void i16dec2octs(int16 in,int16* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void i8dec2octs(int8 in,int8* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void u16dec2octs(uint16 in,uint16* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include +#include "dec2oct.h" +#include + +void u8dec2octs(uint8 in,uint8* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i +#include "hex2dec.h" +#include +#include + +double dhex2decs(double in) +{ + int n=0,rem=0, base=1; + double out=0.0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 16; + } + return out; +} + + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c new file mode 100644 index 00000000..c5b68dbc --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/hex2dec/ghex2decs.c @@ -0,0 +1,81 @@ +#include +#include "hex2dec.h" +#include +#include + +double ghex2decs(char* in,int size) +{ + size-=2; + int i=0,val=0,j=0; + double o=0.0; + for(i=0; in[i]!='\0'; i++) + { +/* Finds the decimal equivalent of each hexadecimal digit +*/ + switch(in[i]) + { + case '0': + val = 0; + break; + case '1': + val = 1; + break; + case '2': + val = 2; + break; + case '3': + val = 3; + break; + case '4': + val = 4; + break; + case '5': + val = 5; + break; + case '6': + val = 6; + break; + case '7': + val = 7; + break; + case '8': + val = 8; + break; + case '9': + val = 9; + break; + case 'a': + case 'A': + val = 10; + break; + case 'b': + case 'B': + val = 11; + break; + case 'c': + case 'C': + val = 12; + break; + case 'd': + case 'D': + val = 13; + break; + case 'e': + case 'E': + val = 14; + break; + case 'f': + case 'F': + val = 15; + break; + } + o = o + (val * pow(16, size)); + //printf("%f\n",out[0]); + //o=(int)out[0]; + //o=o/16; + //printf("%d %d %d\n",o,val,(val * pow(16, size))); + //j++; + size--; + } + return o; + } diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c new file mode 100644 index 00000000..6bb5d00f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/doct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void doct2deca(double* in,int size,double* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +double doct2decs(double in) +{ + int n=0,rem=0, base=1; + double out=0.0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c new file mode 100644 index 00000000..1ab843f8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i16oct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void i16oct2deca(int16* in,int size,int16* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +int16 i16oct2decs(int16 in) /* Function to convert octal to decimal */ +{ + int n=0,rem=0, base=1; + int16 out=0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c new file mode 100644 index 00000000..133806ce --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/i8oct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void i8oct2deca(int8* in,int size,int8* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +int8 i8oct2decs(int8 in) /* Function to convert octal to decimal */ +{ + int n=0,rem=0, base=1; + int8 out=0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c new file mode 100644 index 00000000..cec3a219 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u16oct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void u16oct2deca(uint16* in,int size,uint16* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +uint16 u16oct2decs(uint16 in) /* Function to convert octal to decimal */ +{ + int n=0,rem=0, base=1; + uint16 out=0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c new file mode 100644 index 00000000..3b356587 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/radix_conversions/oct2dec/u8oct2deca.c @@ -0,0 +1,10 @@ +#include "oct2dec.h" + +void u8oct2deca(uint8* in,int size,uint8* out) +{ + int i=0; + for(i=0;i +#include "oct2dec.h" +#include +#include + +uint8 u8oct2decs(uint8 in) /* Function to convert octal to decimal */ +{ + int n=0,rem=0, base=1; + uint8 out=0; + n=(int)in; + while (n!=0) + { + rem = n%10; + out = out + (rem * base); + n = n / 10 ; + base = base * 8; + } + return out; +} + + diff --git a/2.3-1/src/c/elementaryFunctions/special_functions/gamma/dgammas.c b/2.3-1/src/c/elementaryFunctions/special_functions/gamma/dgammas.c new file mode 100644 index 00000000..c466f434 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/special_functions/gamma/dgammas.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +/* very simple approximation */ +double st_gamma(double x) +{ + return sqrt(2.0*M_PI/x)*pow(x/M_E, x); +} + +#define A 12 +double sp_gamma(double z) +{ + const int a = A; + static double c_space[A]; + static double *c = NULL; + int k; + double accm; + + if ( c == NULL ) { + double k1_factrl = 1.0; /* (k - 1)!*(-1)^k with 0!==1*/ + c = c_space; + c[0] = sqrt(2.0*M_PI); + for(k=1; k < a; k++) { + c[k] = exp(a-k) * pow(a-k, k-0.5) / k1_factrl; + k1_factrl *= -k; + } + } + accm = c[0]; + for(k=1; k < a; k++) { + accm += c[k] / ( z + k ); + } + accm *= exp(-(z+a)) * pow(z+a, z+0.5); /* Gamma(z+1) */ + return accm/z; +} + +int main() +{ + double x; + + + printf("%15s%15s%15s%15s\n", "Stirling", "Spouge", "GSL", "libm"); + for(x=1.0; x <= 10.0; x+=1.0) { + printf("%15.8lf%15.8lf%15.8lf%15.8lf\n", st_gamma(x/3.0), sp_gamma(x/3.0), + gsl_sf_gamma(x/3.0), tgamma(x/3.0)); + } + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c b/2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c index 5111dbd7..24c1fa68 100644 --- a/2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c +++ b/2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c @@ -13,7 +13,7 @@ #include "tanh.h" #include "tan.h" -floatComplex ctanhs(floatComplex z) { +floatComplex ctanhs(floatComplex z) { float real = creals(z); float imag = cimags(z); diff --git a/2.3-1/src/c/string/convstr/gconvstrs.c b/2.3-1/src/c/string/convstr/gconvstrs.c index d4174965..3db7663e 100644 --- a/2.3-1/src/c/string/convstr/gconvstrs.c +++ b/2.3-1/src/c/string/convstr/gconvstrs.c @@ -1,7 +1,20 @@ #include #include "convstr.h" -int gconvstrs(int* in) +void gconvstrs(char* in, int size,char* flag,int size2,char* out) { - return (toupper(in)); -} \ No newline at end of file + int i=0;//temp=0; + for(i=0;i +#include +#include "strrchr.h" + +void gstrrchra(char* str,int size,char* key,int size2,char* out) +{ + int i,j, k=0, pos2; + + for (i = 0;i +#include "strrev.h" + +void gstrreva(char* str,int size,char* out) +{ + int i=-1,j=0; + + while(str[++i]!='\0'); + + while(i>=0) + out[j++] = str[--i]; + + out[j]='\0'; + +} diff --git a/2.3-1/src/c/string/strsubst/gstrsubsta.c b/2.3-1/src/c/string/strsubst/gstrsubsta.c new file mode 100644 index 00000000..69ebf3c5 --- /dev/null +++ b/2.3-1/src/c/string/strsubst/gstrsubsta.c @@ -0,0 +1,57 @@ +#include +#include +#include "strsubst.h" + +void gstrsubsta(char* str,int size, char* search, int size2, char* rep, int size3, char* flagmain, int size4, char* out) +{ + int i = 0, j = 0, flag = 0, start = 0; + + //if(flagmain[0]!='r') + //{ + while (str[i] != '\0') + { + if (str[i] == search[j]) + { + if (!flag) + start = i; + j++; + if (search[j] == '\0') + break; + flag = 1; + } + else + { + flag = start = j = 0; + } + i++; + } + + if (search[j] == '\0' && flag) + { + for (i = 0; i < start; i++) + out[i] = str[i]; + /* rep string with another string */ + for (j = 0; j < strlen(rep); j++) + { + out[i] = rep[j]; + i++; + } + + /* copy remaining portion of the input string "str" */ + for (j = start + strlen(search); j < strlen(str); j++) + { + out[i] = str[j]; + i++; + } + + /* print the out string */ + out[i] = '\0'; + //printf("Output: %s\n", out); + } + else + { + printf("%s is not a searching of %s\n", search, str); + } + // } + +} -- cgit