X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Ffunction.pl;h=d4a03cec8289f94e09177eebb056ef5ef903cdc2;hb=56bbb99adc43dad22ee615380d4446a87b713cb8;hp=e1533be27aba0d57cd126b8ae27cb02f719479ec;hpb=ee1ec9db30b446d2d6348df2ce758ed2ff62a310;p=ginac.git diff --git a/ginac/function.pl b/ginac/function.pl index e1533be2..d4a03cec 100644 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -2,7 +2,7 @@ # function.pl options: \$maxargs=${maxargs} # -# GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany +# GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -292,7 +292,7 @@ $interface=<= registered_functions().size() ) { + throw std::runtime_error("function does not exist"); + } } function::function(unsigned ser, std::auto_ptr vp) @@ -1121,7 +1124,7 @@ ex function::conjugate() const const function_options & opt = registered_functions()[serial]; if (opt.conjugate_f==0) { - return exprseq::conjugate(); + return conjugate_function(*this).hold(); } if (opt.conjugate_use_exvector_args) { @@ -1311,8 +1314,8 @@ ex function::power(const ex & power_param) const // power of function // No derivative defined? Then return abstract derivative object if (opt.power_f == NULL) - return (new power::power(*this, power_param))->setflag(status_flags::dynallocated | - status_flags::evaluated); + return (new GiNaC::power(*this, power_param))->setflag(status_flags::dynallocated | + status_flags::evaluated); current_serial = serial; if (opt.power_use_exvector_args) @@ -1388,7 +1391,9 @@ unsigned function::find_function(const std::string &name, unsigned nparams) /** Return the print name of the function. */ std::string function::get_name() const { - GINAC_ASSERT(serial= registered_functions().size() ) { + throw std::runtime_error("unknown function"); + } return registered_functions()[serial].name; }