X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Ffunction.pl;h=f08990d9fdd47b636a54835632a003943a1282c1;hp=41018c93428c8cee29b830411ab43f92fc6a5e6f;hb=871695b656ffdc8336a8c00247dc14255bea7b8b;hpb=78c44ad5dc4b1c70c06bf57c117fb0da94b1dbd3 diff --git a/ginac/function.pl b/ginac/function.pl index 41018c93..f08990d9 100755 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -44,7 +44,7 @@ END_OF_DECLARE_FUNCTION_MACRO_NAMESPACE $declare_function_macro_no_namespace=generate( <<'END_OF_DECLARE_FUNCTION_MACRO_NO_NAMESPACE','ex const & p${N}','p${N}'); #define DECLARE_FUNCTION_${N}P(NAME) \\ -extern unsigned function_index_##NAME; \\ +extern const unsigned function_index_##NAME; \\ inline function NAME(${SEQ1}) { \\ return function(function_index_##NAME, ${SEQ2}); \\ } @@ -110,7 +110,12 @@ END_OF_DIFF_SWITCH_STATEMENT $series_switch_statement=generate( <<'END_OF_SERIES_SWITCH_STATEMENT','seq[${N}-1]',''); case ${N}: - return ((series_funcp_${N})(registered_functions()[serial].s))(${SEQ1},s,point,order); + try { + res = ((series_funcp_${N})(registered_functions()[serial].s))(${SEQ1},s,point,order); + } catch (do_taylor) { + res = basic::series(s, point, order); + } + return res; break; END_OF_SERIES_SWITCH_STATEMENT @@ -136,7 +141,7 @@ $interface=<