# HG changeset patch
# User John Donoghue
# Date 1548078430 18000
# Node ID 79edc3a96749965130880f81d4c8225040b547cd
# Parent 3c2ecfd52069dd85ea836f192eeb4e144339ab60
of-ode: patch for depreciated functions (Bug #55325)
* of-odepkg-3-deprecated.patch: new file
* dist-files.mk: add ref to new patch file
diff -r 3c2ecfd52069 -r 79edc3a96749 dist-files.mk
--- a/dist-files.mk Sun Jan 20 17:41:29 2019 +0100
+++ b/dist-files.mk Mon Jan 21 08:47:10 2019 -0500
@@ -511,6 +511,7 @@
of-octcdf.mk \
of-odepkg-1-fixes.patch \
of-odepkg-2-fixes.patch \
+ of-odepkg-3-deprecated.patch \
of-odepkg.mk \
of-optim-1-fixes.patch \
of-optim.mk \
@@ -526,7 +527,7 @@
of-sockets-1-cross-fixes.patch \
of-sockets.mk \
of-sparsersb.mk \
- of-specfun-1-cross-fixes.patch \
+ of-specfun-1-deprecated.patch \
of-specfun.mk \
of-splines.mk \
of-statistics-1-cross.patch \
diff -r 3c2ecfd52069 -r 79edc3a96749 src/of-odepkg-3-deprecated.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/of-odepkg-3-deprecated.patch Mon Jan 21 08:47:10 2019 -0500
@@ -0,0 +1,2225 @@
+diff -r 1646adc7793b src/odepkg_auxiliary_functions.cc
+--- a/src/odepkg_auxiliary_functions.cc Sun Jan 20 20:52:16 2019 +0100
++++ b/src/odepkg_auxiliary_functions.cc Sun Jan 20 21:30:32 2019 +0100
+@@ -46,7 +46,7 @@
+ * @end deftypefn
+ */
+ octave_idx_type odepkg_auxiliary_isvector (octave_value vval) {
+- if (vval.is_numeric_type () &&
++ if (vval.isnumeric () &&
+ vval.ndims () == 2 && // ported from the is_vector.m file
+ (vval.rows () == 1 || vval.columns () == 1))
+ return (true);
+@@ -85,17 +85,17 @@
+ switch (vdeci) {
+ case 0:
+ varin(3) = "init";
+- feval ("odepkg_event_handle", varin, 0);
++ octave::feval ("odepkg_event_handle", varin, 0);
+ break;
+
+ case 1:
+ varin(3) = "";
+- varout = feval ("odepkg_event_handle", varin, 1);
++ varout = octave::feval ("odepkg_event_handle", varin, 1);
+ break;
+
+ case 2:
+ varin(3) = "done";
+- feval ("odepkg_event_handle", varin, 0);
++ octave::feval ("odepkg_event_handle", varin, 0);
+ break;
+
+ default:
+@@ -132,8 +132,8 @@
+
+ // Check if the user has set the option "OutputSel" then create a
+ // reduced vector that stores the desired values.
+- if (vsel.is_empty ()) {
+- for (octave_idx_type vcnt = 0; vcnt < vresult.length (); vcnt++)
++ if (vsel.isempty ()) {
++ for (octave_idx_type vcnt = 0; vcnt < vresult.numel (); vcnt++)
+ vreduced(vcnt) = vresult(vcnt);
+ }
+ else {
+@@ -159,18 +159,18 @@
+ // function to the caller function
+ if ((vdeci == 0) || (vdeci == 2)) {
+ if (vplt.is_function_handle () || vplt.is_inline_function ())
+- feval (vplt.function_value (), varin, 0);
++ octave::feval (vplt.function_value (), varin, 0);
+ else if (vplt.is_string ()) // String may be used from the caller
+- feval (vplt.string_value (), varin, 0);
++ octave::feval (vplt.string_value (), varin, 0);
+ return (true);
+ }
+
+ else if (vdeci == 1) {
+ octave_value_list vout;
+ if (vplt.is_function_handle () || vplt.is_inline_function ())
+- vout = feval (vplt.function_value (), varin, 1);
++ vout = octave::feval (vplt.function_value (), varin, 1);
+ else if (vplt.is_string ()) // String may be used if set automatically
+- vout = feval (vplt.string_value (), varin, 1);
++ vout = octave::feval (vplt.string_value (), varin, 1);
+ return (vout(0).bool_value ());
+ }
+
+@@ -200,7 +200,7 @@
+
+ // If vjac is a cell array then we expect that two matrices are
+ // returned to the caller function, we can't check for this before
+- if (vjac.is_cell () && (vjac.length () == 2)) {
++ if (vjac.iscell () && (vjac.numel () == 2)) {
+ varout(0) = vjac.cell_value ()(0);
+ varout(1) = vjac.cell_value ()(1);
+ if (!varout(0).is_matrix_type () || !varout(1).is_matrix_type ()) {
+@@ -220,7 +220,7 @@
+ for (octave_idx_type vcnt = 0; vcnt < vextarg.length (); vcnt++)
+ varin(vcnt+3) = vextarg(vcnt);
+ // Evaluate the Jacobian function and return results
+- varout = feval (vjac.function_value (), varin, 1);
++ varout = octave::feval (vjac.function_value (), varin, 1);
+ }
+
+ // In principle this is not possible because odepkg_structure_check
+@@ -268,7 +268,7 @@
+ for (octave_idx_type vcnt = 0; vcnt < vextarg.length (); vcnt++)
+ varin(vcnt+2) = vextarg(vcnt);
+ // Evaluate the Jacobian function and return results
+- varout = feval (vjac.function_value (), varin, 1);
++ varout = octave::feval (vjac.function_value (), varin, 1);
+ vret = varout(0);
+ }
+
+@@ -312,7 +312,7 @@
+ else if (vmass.is_function_handle () || vmass.is_inline_function ()) {
+ octave_value_list varin;
+ octave_value_list varout;
+- if (vstate.is_empty () || !vstate.is_string ())
++ if (vstate.isempty () || !vstate.is_string ())
+ error_with_id ("OdePkg:InvalidOption",
+ "If \"Mass\" value is a handle then \"MStateDependence\" must be given");
+
+@@ -330,7 +330,7 @@
+ }
+
+ // Evaluate the Mass function and return results
+- varout = feval (vmass.function_value (), varin, 1);
++ varout = octave::feval (vmass.function_value (), varin, 1);
+ vret = varout(0);
+ }
+
+@@ -440,7 +440,7 @@
+ break;
+
+ case 3:
+- vtstore = vtstore.extract (0, vtstore.length () - 2);
++ vtstore = vtstore.extract (0, vtstore.numel () - 2);
+ vystore = vystore.extract (0, 0, vtstore.rows () - 2, vtstore.cols () - 1);
+
+ default:
+diff -r 1646adc7793b src/odepkg_octsolver_ddaskr.cc
+--- a/src/odepkg_octsolver_ddaskr.cc Sun Jan 20 20:52:16 2019 +0100
++++ b/src/odepkg_octsolver_ddaskr.cc Sun Jan 20 21:30:32 2019 +0100
+@@ -116,7 +116,7 @@
+ varin(0) = T; varin(1) = A; varin(2) = APRIME;
+ for (octave_idx_type vcnt = 0; vcnt < vddaskrextarg.length (); vcnt++)
+ varin(vcnt+3) = vddaskrextarg(vcnt);
+- octave_value_list vout = feval (vddaskrodefun.function_value (), varin, 1);
++ octave_value_list vout = octave::feval (vddaskrodefun.function_value (), varin, 1);
+
+ // Return the results from the function evaluation to the Fortran
+ // solver, again copy them and don't just create a Fortran vector
+@@ -287,8 +287,8 @@
+ if (nargin >= 5) {
+
+ // Fifth input argument != OdePkg option, need a default structure
+- if (!args(4).is_map ()) {
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ if (!args(4).isstruct ()) {
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
+ vddaskrextarg(vcnt-4) = args(vcnt); // Save arguments in vddaskrextarg
+@@ -298,7 +298,7 @@
+ else if (nargin > 5) {
+ octave_value_list varin;
+ varin(0) = args(4); varin(1) = "odekdi";
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create structure of args(4)
+ for (octave_idx_type vcnt = 5; vcnt < nargin; vcnt++)
+@@ -309,7 +309,7 @@
+ else {
+ octave_value_list varin;
+ varin(0) = args(4); varin(1) = "odekdi"; // Check structure
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+@@ -317,7 +317,7 @@
+ } // if (nargin >= 5)
+
+ else { // if nargin == 4, everything else has been checked before
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+
+@@ -329,7 +329,7 @@
+ // Implementation of the option RelTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vreltol = vodeopt.contents ("RelTol");
+- if (vreltol.is_empty ()) {
++ if (vreltol.isempty ()) {
+ vreltol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"RelTol\" not set, new value 1e-6 is used");
+@@ -345,7 +345,7 @@
+ // Implementation of the option AbsTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vabstol = vodeopt.contents ("AbsTol");
+- if (vabstol.is_empty ()) {
++ if (vabstol.isempty ()) {
+ vabstol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"AbsTol\" not set, new value 1e-6 is used");
+@@ -372,7 +372,7 @@
+ // The option NormControl will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnorm = vodeopt.contents ("NormControl");
+- if (!vnorm.is_empty ())
++ if (!vnorm.isempty ())
+ if (vnorm.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NormControl\" will be ignored by this solver");
+@@ -380,14 +380,14 @@
+ // The option NonNegative will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnneg = vodeopt.contents ("NonNegative");
+- if (!vnneg.is_empty ())
++ if (!vnneg.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NonNegative\" will be ignored by this solver");
+
+ // Implementation of the option OutputFcn has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vplot = vodeopt.contents ("OutputFcn");
+- if (vplot.is_empty () && nargout == 0) vplot = "odeplot";
++ if (vplot.isempty () && nargout == 0) vplot = "odeplot";
+
+ // Implementation of the option OutputSel has been finished, this
+ // option can be set by the user to another value than default value
+@@ -408,12 +408,12 @@
+ // option can be set by the user to another value than default value
+ octave_value vinitstep = vodeopt.contents ("InitialStep");
+ if (args(1).length () > 2) {
+- if (!vinitstep.is_empty ())
++ if (!vinitstep.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" will be ignored if fixed time stamps are given");
+ vinitstep = args(1).vector_value ()(1);
+ }
+- else if (vinitstep.is_empty ()) {
++ else if (vinitstep.isempty ()) {
+ vinitstep = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" not set, new value 1e-6 is used");
+@@ -422,7 +422,7 @@
+ // Implementation of the option MaxStep has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxstep = vodeopt.contents ("MaxStep");
+- if (vmaxstep.is_empty () && args(1).length () == 2) {
++ if (vmaxstep.isempty () && args(1).length () == 2) {
+ vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxStep\" not set, new value %3.1e is used",
+@@ -437,19 +437,19 @@
+
+ // The options 'Jacobian', 'JPattern' and 'Vectorized'
+ octave_value vjac = vodeopt.contents ("Jacobian");
+- if (!vjac.is_empty ()) vddaskrjacfun = vjac;
++ if (!vjac.isempty ()) vddaskrjacfun = vjac;
+
+ // The option Mass will be ignored by this solver. We can't handle
+ // Mass-matrix options with IDE problems
+ octave_value vmass = vodeopt.contents ("Mass");
+- if (!vmass.is_empty ())
++ if (!vmass.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"Mass\" will be ignored by this solver");
+
+ // The option MStateDependence will be ignored by this solver. We
+ // can't handle Mass-matrix options with IDE problems
+ octave_value vmst = vodeopt.contents ("MStateDependence");
+- if (!vmst.is_empty ())
++ if (!vmst.isempty ())
+ if (vmst.string_value ().compare ("weak") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MStateDependence\" will be ignored by this solver");
+@@ -457,14 +457,14 @@
+ // The option MvPattern will be ignored by this solver. We
+ // can't handle Mass-matrix options with IDE problems
+ octave_value vmvpat = vodeopt.contents ("MvPattern");
+- if (!vmvpat.is_empty ())
++ if (!vmvpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MvPattern\" will be ignored by this solver");
+
+ // The option MvPattern will be ignored by this solver. We
+ // can't handle Mass-matrix options with IDE problems
+ octave_value vmsing = vodeopt.contents ("MassSingular");
+- if (!vmsing.is_empty ())
++ if (!vmsing.isempty ())
+ if (vmsing.string_value ().compare ("maybe") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MassSingular\" will be ignored by this solver");
+@@ -472,14 +472,14 @@
+ // The option InitialSlope will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vinitslope = vodeopt.contents ("InitialSlope");
+- if (!vinitslope.is_empty ())
++ if (!vinitslope.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialSlope\" will be ignored by this solver");
+
+ // Implementation of the option MaxOrder has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxder = vodeopt.contents ("MaxOrder");
+- if (vmaxder.is_empty ()) {
++ if (vmaxder.isempty ()) {
+ vmaxder = 3;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxOrder\" not set, new value 3 is used");
+@@ -492,7 +492,7 @@
+
+ // The option BDF will be ignored because this is a BDF solver
+ octave_value vbdf = vodeopt.contents ("BDF");
+- if (!vbdf.is_empty ())
++ if (!vbdf.isempty ())
+ if (vbdf.string_value () != "on") {
+ vbdf = "on"; warning_with_id ("OdePkg:InvalidOption",
+ "Option \"BDF\" set \"off\", new value \"on\" is used");
+@@ -502,12 +502,12 @@
+ // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
+ // CAN HANDLE THESE OPTIONS
+ octave_value vntol = vodeopt.contents ("NewtonTol");
+- if (!vntol.is_empty ())
++ if (!vntol.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NewtonTol\" will be ignored by this solver");
+ octave_value vmaxnewton =
+ vodeopt.contents ("MaxNewtonIterations");
+- if (!vmaxnewton.is_empty ())
++ if (!vmaxnewton.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxNewtonIterations\" will be ignored by this solver");
+
+@@ -523,7 +523,7 @@
+
+ vddaskrneqn = args(2).length ();
+ double T = vTIME(0);
+- double TEND = vTIME(vTIME.length () - 1);
++ double TEND = vTIME(vTIME.numel () - 1);
+ double *Y = vY.fortran_vec ();
+ double *YPRIME = vYPRIME.fortran_vec ();
+
+@@ -553,7 +553,7 @@
+ INFO[1] = vitol; // RelTol/AbsTol are scalars or vectors
+ INFO[2] = 1; // An intermediate output is wanted
+ INFO[3] = 0; // Integrate behind TEND
+- if (!vjac.is_empty ()) INFO[4] = 1;
++ if (!vjac.isempty ()) INFO[4] = 1;
+ else INFO[4] = 0; // Internally calculate a Jacobian? 0..yes
+ INFO[5] = 0; // Have a full Jacobian matrix? 0..yes
+ INFO[6] = 1; // Use the value for maximum step size
+@@ -569,14 +569,14 @@
+ // initialize these IO-functions for further use
+ octave_value vtim (T); octave_value vsol (vY); octave_value vyds (vYPRIME);
+ odepkg_auxiliary_solstore (vtim, vsol, 0);
+- if (!vplot.is_empty ())
++ if (!vplot.isempty ())
+ odepkg_auxiliary_evalplotfun (vplot, voutsel, args(1), args(2), vddaskrextarg, 0);
+
+ octave_value_list veveideargs;
+ veveideargs(0) = vsol;
+ veveideargs(1) = vyds;
+ Cell veveidearg (veveideargs);
+- if (!vevents.is_empty ())
++ if (!vevents.isempty ())
+ odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vddaskrextarg, 0);
+
+ // We are calling the core solver here to intialize all variables
+@@ -597,7 +597,7 @@
+ ColumnVector vcres(vddaskrneqn);
+ ColumnVector vydrs(vddaskrneqn);
+
+- if (vTIME.length () == 2) {
++ if (vTIME.numel () == 2) {
+
+ INFO[0] = 1; // Set this info variable ie. continue solving
+
+@@ -621,22 +621,22 @@
+ }
+ vsol = vcres; vyds = vydrs; vtim = T;
+
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ veveideargs(0) = vsol;
+ veveideargs(1) = vyds;
+ veveidearg = veveideargs;
+ veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vddaskrextarg, 1);
+- if (!veveres(0).cell_value ()(0).is_empty ())
++ if (!veveres(0).cell_value ()(0).isempty ())
+ if (veveres(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
+- vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ T = TEND; // let's get out here, the Events function told us to finish
+ }
+ }
+
+- if (!vplot.is_empty ()) {
++ if (!vplot.isempty ()) {
+ if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vddaskrextarg, 1)) {
+ error ("Missing error message implementation");
+ return (vretval);
+@@ -660,9 +660,9 @@
+ veveideargs(0) = vsol;
+ veveideargs(1) = vyds;
+ veveidearg = veveideargs;
+- if (!vevents.is_empty ())
++ if (!vevents.isempty ())
+ odepkg_auxiliary_evaleventfun (vevents, vtim, vsol, vddaskrextarg, 2);
+- if (!vplot.is_empty ())
++ if (!vplot.isempty ())
+ odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vddaskrextarg, 2);
+
+ // Return the results that have been stored in the
+@@ -695,7 +695,7 @@
+ vretmap.assign ("solver", "odekdi");
+ if (vstats.string_value ().compare ("on") == 0)
+ vretmap.assign ("stats", vstatinfo);
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ vretmap.assign ("ie", veveres(0).cell_value ()(1));
+ vretmap.assign ("xe", veveres(0).cell_value ()(2));
+ vretmap.assign ("ye", veveres(0).cell_value ()(3));
+@@ -713,7 +713,7 @@
+ vretval(2) = vempty;
+ vretval(3) = vempty;
+ vretval(4) = vempty;
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ vretval(2) = veveres(0).cell_value ()(2);
+ vretval(3) = veveres(0).cell_value ()(3);
+ vretval(4) = veveres(0).cell_value ()(1);
+diff -r 1646adc7793b src/odepkg_octsolver_mebdfdae.cc
+--- a/src/odepkg_octsolver_mebdfdae.cc Sun Jan 20 20:52:16 2019 +0100
++++ b/src/odepkg_octsolver_mebdfdae.cc Sun Jan 20 21:30:32 2019 +0100
+@@ -100,7 +100,7 @@
+ varin(0) = T; varin(1) = A;
+ for (octave_idx_type vcnt = 0; vcnt < vmebdfdaeextarg.length (); vcnt++)
+ varin(vcnt+2) = vmebdfdaeextarg(vcnt);
+- octave_value_list vout = feval (vmebdfdaeodefun.function_value (), varin, 1);
++ octave_value_list vout = octave::feval (vmebdfdaeodefun.function_value (), varin, 1);
+
+ // Return the results from the function evaluation to the Fortran
+ // solver, again copy them and don't just create a Fortran vector
+@@ -317,8 +317,8 @@
+ if (nargin >= 4) {
+
+ // Fourth input argument != OdePkg option, need a default structure
+- if (!args(3).is_map ()) {
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ if (!args(3).isstruct ()) {
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
+ vmebdfdaeextarg(vcnt-3) = args(vcnt); // Save arguments in vmebdfdaeextarg
+@@ -328,7 +328,7 @@
+ else if (nargin > 4) {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "odebda";
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
+ for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
+@@ -339,7 +339,7 @@
+ else {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "odebda"; // Check structure
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+@@ -347,7 +347,7 @@
+ } // if (nargin >= 4)
+
+ else { // if nargin == 3, everything else has been checked before
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+
+@@ -359,7 +359,7 @@
+ // Implementation of the option RelTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vreltol = vodeopt.contents ("RelTol");
+- if (vreltol.is_empty ()) {
++ if (vreltol.isempty ()) {
+ vreltol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"RelTol\" not set, new value %3.1e is used",
+@@ -376,7 +376,7 @@
+ // Implementation of the option AbsTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vabstol = vodeopt.contents ("AbsTol");
+- if (vabstol.is_empty ()) {
++ if (vabstol.isempty ()) {
+ vabstol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"AbsTol\" not set, new value %3.1e is used",
+@@ -401,7 +401,7 @@
+ // The option NormControl will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnorm = vodeopt.contents ("NormControl");
+- if (!vnorm.is_empty ())
++ if (!vnorm.isempty ())
+ if (vnorm.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NormControl\" will be ignored by this solver");
+@@ -409,14 +409,14 @@
+ // The option NonNegative will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnneg = vodeopt.contents ("NonNegative");
+- if (!vnneg.is_empty ())
++ if (!vnneg.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NonNegative\" will be ignored by this solver");
+
+ // Implementation of the option OutputFcn has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vplot = vodeopt.contents ("OutputFcn");
+- if (vplot.is_empty () && nargout == 0) vplot = "odeplot";
++ if (vplot.isempty () && nargout == 0) vplot = "odeplot";
+
+ // Implementation of the option OutputSel has been finished, this
+ // option can be set by the user to another value than default value
+@@ -437,12 +437,12 @@
+ // option can be set by the user to another value than default value
+ octave_value vinitstep = vodeopt.contents ("InitialStep");
+ if (args(1).length () > 2) {
+- if (!vinitstep.is_empty ())
++ if (!vinitstep.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" will be ignored if fixed time stamps are given");
+ vinitstep = args(1).vector_value ()(1);
+ }
+- if (vinitstep.is_empty ()) {
++ if (vinitstep.isempty ()) {
+ vinitstep = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" not set, new value %3.1e is used",
+@@ -452,7 +452,7 @@
+ // Implementation of the option MaxStep has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxstep = vodeopt.contents ("MaxStep");
+- if (vmaxstep.is_empty () && args(1).length () == 2) {
++ if (vmaxstep.isempty () && args(1).length () == 2) {
+ vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxStep\" not set, new value %3.1e is used",
+@@ -468,7 +468,7 @@
+ // The options 'Jacobian', 'JPattern' and 'Vectorized'
+ octave_value vjac = vodeopt.contents ("Jacobian");
+ octave_idx_type vmebdfdaejac = 22; // We need to set this if no Jac available
+- if (!vjac.is_empty ()) {
++ if (!vjac.isempty ()) {
+ vmebdfdaejacfun = vjac; vmebdfdaejac = 21;
+ }
+
+@@ -476,7 +476,7 @@
+ // options can be set by the user to another value than default
+ vmebdfdaemass = vodeopt.contents ("Mass");
+ octave_idx_type vmebdfdaemas = 0;
+- if (!vmebdfdaemass.is_empty ()) {
++ if (!vmebdfdaemass.isempty ()) {
+ vmebdfdaemas = 1;
+ if (vmebdfdaemass.is_function_handle () || vmebdfdaemass.is_inline_function ())
+ warning_with_id ("OdePkg:InvalidOption",
+@@ -486,7 +486,7 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ vmebdfdaemassstate = vodeopt.contents ("MStateDependence");
+- if (!vmebdfdaemassstate.is_empty ())
++ if (!vmebdfdaemassstate.isempty ())
+ if (vmebdfdaemassstate.string_value ().compare ("weak") != 0) // 'weak' is default
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MStateDependence\" will be ignored by this solver");
+@@ -494,14 +494,14 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmvpat = vodeopt.contents ("MvPattern");
+- if (!vmvpat.is_empty ())
++ if (!vmvpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MvPattern\" will be ignored by this solver");
+
+ // The option MassSingular will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmsing = vodeopt.contents ("MassSingular");
+- if (!vmsing.is_empty ())
++ if (!vmsing.isempty ())
+ if (vmsing.string_value ().compare ("maybe") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MassSingular\" will be ignored by this solver");
+@@ -509,14 +509,14 @@
+ // The option InitialSlope will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vinitslope = vodeopt.contents ("InitialSlope");
+- if (!vinitslope.is_empty ())
++ if (!vinitslope.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialSlope\" will be ignored by this solver");
+
+ // Implementation of the option MaxOrder has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxder = vodeopt.contents ("MaxOrder");
+- if (vmaxder.is_empty ()) {
++ if (vmaxder.isempty ()) {
+ vmaxder = 3;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxOrder\" not set, new value %1d is used",
+@@ -540,12 +540,12 @@
+ // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
+ // CAN HANDLE THESE OPTIONS
+ octave_value vntol = vodeopt.contents ("NewtonTol");
+- if (!vntol.is_empty ())
++ if (!vntol.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NewtonTol\" will be ignored by this solver");
+ octave_value vmaxnewton =
+ vodeopt.contents ("MaxNewtonIterations");
+- if (!vmaxnewton.is_empty ())
++ if (!vmaxnewton.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxNewtonIterations\" will be ignored by this solver");
+
+@@ -563,7 +563,7 @@
+ double HO = vinitstep.double_value ();
+ double *Y0 = vY0.fortran_vec ();
+ double TOUT = T0 + vinitstep.double_value ();
+- double TEND = vTIME(vTIME.length ()-1);
++ double TEND = vTIME(vTIME.numel ()-1);
+
+ octave_idx_type MF = vmebdfdaejac;
+ octave_idx_type IDID = 1;
+@@ -578,7 +578,7 @@
+ IWORK[vcnt] = 0;
+ octave_idx_type MBND[4] = {N, N, N, N};
+ octave_idx_type MASBND[4] = {0, N, 0, N};
+- if (!vmebdfdaemass.is_empty ()) MASBND[0] = 1;
++ if (!vmebdfdaemass.isempty ()) MASBND[0] = 1;
+ octave_idx_type MAXDER = vmaxder.int_value ();
+ octave_idx_type ITOL = vitol;
+ double *RTOL = vRTOL.fortran_vec ();
+@@ -596,9 +596,9 @@
+ // etc. and initialize the plot, events and the solstore functions
+ octave_value vtim (T0); octave_value vsol (vY0);
+ odepkg_auxiliary_solstore (vtim, vsol, 0);
+- if (!vplot.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vplot.isempty ()) odepkg_auxiliary_evalplotfun
+ (vplot, voutsel, args(1), args(2), vmebdfdaeextarg, 0);
+- if (!vevents.is_empty ()) odepkg_auxiliary_evaleventfun
++ if (!vevents.isempty ()) odepkg_auxiliary_evaleventfun
+ (vevents, vtim, args(2), vmebdfdaeextarg, 0);
+
+ // We are calling the core solver here to intialize all variables
+@@ -618,7 +618,7 @@
+ // core solver function and before calling the plot function
+ ColumnVector vcres(N);
+
+- if (vTIME.length () == 2) {
++ if (vTIME.numel () == 2) {
+ // Before we are entering the solver loop replace the first time
+ // stamp value with FirstStep = (InitTime - InitStep)
+ TOUT = TOUT - vinitstep.double_value ();
+@@ -649,18 +649,18 @@
+ for (octave_idx_type vcnt = 0; vcnt < N; vcnt++)
+ vcres(vcnt) = Y0[vcnt];
+ vsol = vcres; vtim = TOUT;
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, vsol, vmebdfdaeextarg, 1);
+- if (!veveres(0).cell_value ()(0).is_empty ())
++ if (!veveres(0).cell_value ()(0).isempty ())
+ if (veveres(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
+- vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ TOUT = TEND; // let's get out here, the Events function told us to finish
+ }
+ }
+- if (!vplot.is_empty ()) {
++ if (!vplot.isempty ()) {
+ if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfdaeextarg, 1)) {
+ error ("Missing error message implementation");
+ return (vretval);
+@@ -671,7 +671,7 @@
+ }
+ else { // if (vTIME.length () > 2) we have all the time values needed
+ volatile octave_idx_type vtimecnt = 1;
+- octave_idx_type vtimelen = vTIME.length ();
++ octave_idx_type vtimelen = vTIME.numel ();
+ while (vtimecnt < vtimelen) {
+ vtimecnt++; TOUT = vTIME(vtimecnt-1);
+
+@@ -696,18 +696,18 @@
+ for (octave_idx_type vcnt = 0; vcnt < N; vcnt++)
+ vcres(vcnt) = Y0[vcnt];
+ vsol = vcres; vtim = TOUT;
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, vsol, vmebdfdaeextarg, 1);
+- if (!veveres(0).cell_value ()(0).is_empty ())
++ if (!veveres(0).cell_value ()(0).isempty ())
+ if (veveres(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
+- vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ vtimecnt = vtimelen; // let's get out here, the Events function told us to finish
+ }
+ }
+- if (!vplot.is_empty ()) {
++ if (!vplot.isempty ()) {
+ if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfdaeextarg, 1)) {
+ error ("Missing error message implementation");
+ return (vretval);
+@@ -725,9 +725,9 @@
+ // needed to call the OdePkg output function one last time again
+ for (octave_idx_type vcnt = 0; vcnt < N; vcnt++) vcres(vcnt) = Y0[vcnt];
+ vsol = vcres; vtim = TOUT;
+- if (!vevents.is_empty ())
++ if (!vevents.isempty ())
+ odepkg_auxiliary_evaleventfun (vevents, vtim, vsol, vmebdfdaeextarg, 2);
+- if (!vplot.is_empty ())
++ if (!vplot.isempty ())
+ odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfdaeextarg, 2);
+
+ // Return the results that have been stored in the
+@@ -761,7 +761,7 @@
+ vretmap.assign ("solver", "odebda");
+ if (vstats.string_value () == "on")
+ vretmap.assign ("stats", vstatinfo);
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ vretmap.assign ("ie", veveres(0).cell_value ()(1));
+ vretmap.assign ("xe", veveres(0).cell_value ()(2));
+ vretmap.assign ("ye", veveres(0).cell_value ()(3));
+@@ -779,7 +779,7 @@
+ vretval(2) = vempty;
+ vretval(3) = vempty;
+ vretval(4) = vempty;
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ vretval(2) = veveres(0).cell_value ()(2);
+ vretval(3) = veveres(0).cell_value ()(3);
+ vretval(4) = veveres(0).cell_value ()(1);
+diff -r 1646adc7793b src/odepkg_octsolver_mebdfi.cc
+--- a/src/odepkg_octsolver_mebdfi.cc Sun Jan 20 20:52:16 2019 +0100
++++ b/src/odepkg_octsolver_mebdfi.cc Sun Jan 20 21:30:32 2019 +0100
+@@ -162,7 +162,7 @@
+ varin(0) = T; varin(1) = A; varin(2) = APRIME;
+ for (octave_idx_type vcnt = 0; vcnt < vmebdfiextarg.length (); vcnt++)
+ varin(vcnt+3) = vmebdfiextarg(vcnt);
+- octave_value_list vout = feval (vmebdfiodefun.function_value (), varin, 1);
++ octave_value_list vout = octave::feval (vmebdfiodefun.function_value (), varin, 1);
+
+ // Return the results from the function evaluation to the Fortran
+ // solver, again copy them and don't just create a Fortran vector
+@@ -397,7 +397,7 @@
+
+ // Check if the third and the fourth input argument (check for
+ // vector already was successful before) have the same length
+- if (args(2).length () != args(3).length ()) {
++ if (args(2).numel () != args(3).numel ()) {
+ error_with_id ("OdePkg:InvalidArgument",
+ "Third and fourth input argument must have the same length");
+ return (vretval);
+@@ -409,8 +409,8 @@
+ if (nargin >= 5) {
+
+ // Fifth input argument != OdePkg option, need a default structure
+- if (!args(4).is_map ()) {
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ if (!args(4).isstruct ()) {
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
+ vmebdfiextarg(vcnt-4) = args(vcnt); // Save arguments in vmebdfiextarg
+@@ -420,7 +420,7 @@
+ else if (nargin > 5) {
+ octave_value_list varin;
+ varin(0) = args(4); varin(1) = "odebdi";
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create structure of args(4)
+ for (octave_idx_type vcnt = 5; vcnt < nargin; vcnt++)
+@@ -431,7 +431,7 @@
+ else {
+ octave_value_list varin;
+ varin(0) = args(4); varin(1) = "odebdi"; // Check structure
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+@@ -439,7 +439,7 @@
+ } // if (nargin >= 5)
+
+ else { // if nargin == 4, everything else has been checked before
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+
+@@ -451,14 +451,14 @@
+ // Implementation of the option RelTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vreltol = vodeopt.contents ("RelTol");
+- if (vreltol.is_empty ()) {
++ if (vreltol.isempty ()) {
+ vreltol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"RelTol\" not set, new value %3.1e is used",
+ vreltol.double_value ());
+ } // vreltol.print (octave_stdout, true); return (vretval);
+ if (!vreltol.is_scalar_type ()) {
+- if (vreltol.length () != args(2).length ()) {
++ if (vreltol.numel () != args(2).numel ()) {
+ error_with_id ("OdePkg:InvalidOption",
+ "Length of option \"RelTol\" must be the same as the number of equations");
+ return (vretval);
+@@ -468,14 +468,14 @@
+ // Implementation of the option AbsTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vabstol = vodeopt.contents ("AbsTol");
+- if (vabstol.is_empty ()) {
++ if (vabstol.isempty ()) {
+ vabstol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"AbsTol\" not set, new value %3.1e is used",
+ vabstol.double_value ());
+ } // vabstol.print (octave_stdout, true); return (vretval);
+ if (!vabstol.is_scalar_type ()) {
+- if (vabstol.length () != args(2).length ()) {
++ if (vabstol.numel () != args(2).numel ()) {
+ error_with_id ("OdePkg:InvalidOption",
+ "Length of option \"AbsTol\" must be the same as the number of equations");
+ return (vretval);
+@@ -493,7 +493,7 @@
+ // The option NormControl will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnorm = vodeopt.contents ("NormControl");
+- if (!vnorm.is_empty ())
++ if (!vnorm.isempty ())
+ if (vnorm.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NormControl\" will be ignored by this solver");
+@@ -501,14 +501,14 @@
+ // The option NonNegative will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnneg = vodeopt.contents ("NonNegative");
+- if (!vnneg.is_empty ())
++ if (!vnneg.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NonNegative\" will be ignored by this solver");
+
+ // Implementation of the option OutputFcn has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vplot = vodeopt.contents ("OutputFcn");
+- if (vplot.is_empty () && nargout == 0) vplot = "odeplot";
++ if (vplot.isempty () && nargout == 0) vplot = "odeplot";
+
+ // Implementation of the option OutputSel has been finished, this
+ // option can be set by the user to another value than default value
+@@ -528,13 +528,13 @@
+ // Implementation of the option InitialStep has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vinitstep = vodeopt.contents ("InitialStep");
+- if (args(1).length () > 2) {
+- if (!vinitstep.is_empty ())
++ if (args(1).numel () > 2) {
++ if (!vinitstep.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" will be ignored if fixed time stamps are given");
+ vinitstep = args(1).vector_value ()(1);
+ }
+- if (vinitstep.is_empty ()) {
++ if (vinitstep.isempty ()) {
+ vinitstep = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" not set, new value %3.1e is used",
+@@ -544,7 +544,7 @@
+ // Implementation of the option MaxStep has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxstep = vodeopt.contents ("MaxStep");
+- if (vmaxstep.is_empty () && args(1).length () == 2) {
++ if (vmaxstep.isempty () && args(1).numel () == 2) {
+ vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxStep\" not set, new value %3.1e is used",
+@@ -560,21 +560,21 @@
+ // The options 'Jacobian', 'JPattern' and 'Vectorized'
+ octave_value vjac = vodeopt.contents ("Jacobian");
+ octave_idx_type vmebdfijac = 22; // We need to set this if no Jac available
+- if (!vjac.is_empty ()) {
++ if (!vjac.isempty ()) {
+ vmebdfijacfun = vjac; vmebdfijac = 21;
+ }
+
+ // The option Mass will be ignored by this solver. We can't handle
+ // Mass-matrix options with IDE problems
+ octave_value vmass = vodeopt.contents ("Mass");
+- if (!vmass.is_empty ())
++ if (!vmass.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"Mass\" will be ignored by this solver");
+
+ // The option MStateDependence will be ignored by this solver. We
+ // can't handle Mass-matrix options with IDE problems
+ octave_value vmst = vodeopt.contents ("MStateDependence");
+- if (!vmst.is_empty ())
++ if (!vmst.isempty ())
+ if (vmst.string_value ().compare ("weak") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MStateDependence\" will be ignored by this solver");
+@@ -582,14 +582,14 @@
+ // The option MvPattern will be ignored by this solver. We
+ // can't handle Mass-matrix options with IDE problems
+ octave_value vmvpat = vodeopt.contents ("MvPattern");
+- if (!vmvpat.is_empty ())
++ if (!vmvpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MvPattern\" will be ignored by this solver");
+
+ // The option MvPattern will be ignored by this solver. We
+ // can't handle Mass-matrix options with IDE problems
+ octave_value vmsing = vodeopt.contents ("MassSingular");
+- if (!vmsing.is_empty ())
++ if (!vmsing.isempty ())
+ if (vmsing.string_value ().compare ("maybe") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MassSingular\" will be ignored by this solver");
+@@ -597,14 +597,14 @@
+ // The option InitialSlope will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vinitslope = vodeopt.contents ("InitialSlope");
+- if (!vinitslope.is_empty ())
++ if (!vinitslope.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialSlope\" will be ignored by this solver");
+
+ // Implementation of the option MaxOrder has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxder = vodeopt.contents ("MaxOrder");
+- if (vmaxder.is_empty ()) {
++ if (vmaxder.isempty ()) {
+ vmaxder = 3;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxOrder\" not set, new value %1d is used",
+@@ -628,12 +628,12 @@
+ // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
+ // CAN HANDLE THESE OPTIONS
+ octave_value vntol = vodeopt.contents ("NewtonTol");
+- if (!vntol.is_empty ())
++ if (!vntol.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NewtonTol\" will be ignored by this solver");
+ octave_value vmaxnewton =
+ vodeopt.contents ("MaxNewtonIterations");
+- if (!vmaxnewton.is_empty ())
++ if (!vmaxnewton.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxNewtonIterations\" will be ignored by this solver");
+
+@@ -647,13 +647,13 @@
+ NDArray vY0 = args(2).array_value ();
+ NDArray vYPRIME = args(3).array_value ();
+
+- octave_idx_type N = args(2).length ();
++ octave_idx_type N = args(2).numel ();
+ double T0 = vTIME(0);
+ double HO = vinitstep.double_value ();
+ double *Y0 = vY0.fortran_vec ();
+ double *YPRIME = vYPRIME.fortran_vec ();
+ double TOUT = T0 + vinitstep.double_value ();
+- double TEND = vTIME(vTIME.length ()-1);
++ double TEND = vTIME(vTIME.numel ()-1);
+
+ octave_idx_type MF = vmebdfijac;
+ octave_idx_type IDID = 1;
+@@ -682,14 +682,14 @@
+ // etc. and initialize the plot, events and the solstore functions
+ octave_value vtim (T0); octave_value vsol (vY0); octave_value vyds (vYPRIME);
+ odepkg_auxiliary_solstore (vtim, vsol, 0);
+- if (!vplot.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vplot.isempty ()) odepkg_auxiliary_evalplotfun
+ (vplot, voutsel, args(1), args(2), vmebdfiextarg, 0);
+
+ octave_value_list veveideargs;
+ veveideargs(0) = vsol;
+ veveideargs(1) = vyds;
+ Cell veveidearg (veveideargs);
+- if (!vevents.is_empty ()) odepkg_auxiliary_evaleventfun
++ if (!vevents.isempty ()) odepkg_auxiliary_evaleventfun
+ (vevents, vtim, veveidearg, vmebdfiextarg, 0);
+
+ // We are calling the core solver here to intialize all variables
+@@ -710,7 +710,7 @@
+ ColumnVector vcres(N);
+ ColumnVector vydrs(N);
+
+- if (vTIME.length () == 2) {
++ if (vTIME.numel () == 2) {
+ // Before we are entering the solver loop replace the first time
+ // stamp value with FirstStep = (InitTime - InitStep)
+ TOUT = TOUT - vinitstep.double_value ();
+@@ -742,21 +742,21 @@
+ vcres(vcnt) = Y0[vcnt]; vydrs(vcnt) = YPRIME[vcnt];
+ }
+ vsol = vcres; vyds = vydrs; vtim = TOUT;
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ veveideargs(0) = vsol;
+ veveideargs(1) = vyds;
+ veveidearg = veveideargs;
+ veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vmebdfiextarg, 1);
+- if (!veveres(0).cell_value ()(0).is_empty ())
++ if (!veveres(0).cell_value ()(0).isempty ())
+ if (veveres(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
+- vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ TOUT = TEND; // let's get out here, the Events function told us to finish
+ }
+ }
+- if (!vplot.is_empty ()) {
++ if (!vplot.isempty ()) {
+ if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfiextarg, 1)) {
+ error ("Missing error message implementation");
+ return (vretval);
+@@ -765,9 +765,9 @@
+ odepkg_auxiliary_solstore (vtim, vsol, 1);
+ }
+ }
+- else { // if (vTIME.length () > 2) we have all the time values needed
++ else { // if (vTIME.numel () > 2) we have all the time values needed
+ volatile octave_idx_type vtimecnt = 1;
+- octave_idx_type vtimelen = vTIME.length () - 1;
++ octave_idx_type vtimelen = vTIME.numel () - 1;
+ while (vtimecnt < vtimelen) {
+ vtimecnt++; TOUT = vTIME(vtimecnt);
+
+@@ -793,21 +793,21 @@
+ vcres(vcnt) = Y0[vcnt]; vydrs(vcnt) = YPRIME[vcnt];
+ }
+ vsol = vcres; vyds = vydrs; vtim = TOUT;
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ veveideargs(0) = vsol;
+ veveideargs(1) = vyds;
+ veveidearg = veveideargs;
+ veveres = odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vmebdfiextarg, 1);
+- if (!veveres(0).cell_value ()(0).is_empty ())
++ if (!veveres(0).cell_value ()(0).isempty ())
+ if (veveres(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = veveres(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = veveres(0).cell_value ()(3).matrix_value ();
+- vtim = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vtim = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vsol = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ vtimecnt = vtimelen; // let's get out here, the Events function told us to finish
+ }
+ }
+- if (!vplot.is_empty ()) {
++ if (!vplot.isempty ()) {
+ if (odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfiextarg, 1)) {
+ error ("Missing error message implementation");
+ return (vretval);
+@@ -830,9 +830,9 @@
+ veveideargs(0) = vsol;
+ veveideargs(1) = vyds;
+ veveidearg = veveideargs;
+- if (!vevents.is_empty ())
++ if (!vevents.isempty ())
+ odepkg_auxiliary_evaleventfun (vevents, vtim, veveidearg, vmebdfiextarg, 2);
+- if (!vplot.is_empty ())
++ if (!vplot.isempty ())
+ odepkg_auxiliary_evalplotfun (vplot, voutsel, vtim, vsol, vmebdfiextarg, 2);
+
+ // Return the results that have been stored in the
+@@ -866,7 +866,7 @@
+ vretmap.assign ("solver", "odebdi");
+ if (vstats.string_value () == "on")
+ vretmap.assign ("stats", vstatinfo);
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ vretmap.assign ("ie", veveres(0).cell_value ()(1));
+ vretmap.assign ("xe", veveres(0).cell_value ()(2));
+ vretmap.assign ("ye", veveres(0).cell_value ()(3));
+@@ -884,7 +884,7 @@
+ vretval(2) = vempty;
+ vretval(3) = vempty;
+ vretval(4) = vempty;
+- if (!vevents.is_empty ()) {
++ if (!vevents.isempty ()) {
+ vretval(2) = veveres(0).cell_value ()(2);
+ vretval(3) = veveres(0).cell_value ()(3);
+ vretval(4) = veveres(0).cell_value ()(1);
+diff -r 1646adc7793b src/odepkg_octsolver_radau.cc
+--- a/src/odepkg_octsolver_radau.cc Sun Jan 20 20:52:16 2019 +0100
++++ b/src/odepkg_octsolver_radau.cc Sun Jan 20 21:30:32 2019 +0100
+@@ -114,7 +114,7 @@
+ varin(0) = X; varin(1) = A;
+ for (octave_idx_type vcnt = 0; vcnt < vradauextarg.length (); vcnt++)
+ varin(vcnt+2) = vradauextarg(vcnt);
+- octave_value_list vout = feval (vradauodefun.function_value (), varin, 1);
++ octave_value_list vout = octave::feval (vradauodefun.function_value (), varin, 1);
+
+ // Return the results from the function evaluation to the Fortran
+ // solver, again copy them and don't just create a Fortran vector
+@@ -200,14 +200,14 @@
+ octave_value vy = octave_value (A);
+
+ // Check if an 'Events' function has been set by the user
+- if (!vradauevefun.is_empty ()) {
++ if (!vradauevefun.isempty ()) {
+ vradauevesol = odepkg_auxiliary_evaleventfun
+ (vradauevefun, vt, vy, vradauextarg, 1);
+- if (!vradauevesol(0).cell_value ()(0).is_empty ())
++ if (!vradauevesol(0).cell_value ()(0).isempty ())
+ if (vradauevesol(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = vradauevesol(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = vradauevesol(0).cell_value ()(3).matrix_value ();
+- vt = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vt = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vy = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ IRTRN = (vradauevesol(0).cell_value ()(0).int_value () ? -1 : 0);
+ }
+@@ -219,7 +219,7 @@
+
+ // Check if an 'OutputFcn' has been set by the user (including the
+ // values of the options for 'OutputSel' and 'Refine')
+- if (!vradaupltfun.is_empty ()) {
++ if (!vradaupltfun.isempty ()) {
+ if (vradaurefine.int_value () > 0) {
+ ColumnVector B(N); double vtb = 0.0;
+ for (octave_idx_type vcnt = 1; vcnt < vradaurefine.int_value (); vcnt++) {
+@@ -320,8 +320,8 @@
+ if (nargin >= 4) {
+
+ // Fourth input argument != OdePkg option, need a default structure
+- if (!args(3).is_map ()) {
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ if (!args(3).isstruct ()) {
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
+ vradauextarg(vcnt-3) = args(vcnt); // Save arguments in vradauextarg
+@@ -331,7 +331,7 @@
+ else if (nargin > 4) {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "ode2r";
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
+ for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
+@@ -342,7 +342,7 @@
+ else {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "ode2r"; // Check structure
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+@@ -350,7 +350,7 @@
+ } // if (nargin >= 4)
+
+ else { // if nargin == 3, everything else has been checked before
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+
+@@ -362,7 +362,7 @@
+ // Implementation of the option RelTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vreltol = vodeopt.contents ("RelTol");
+- if (vreltol.is_empty ()) {
++ if (vreltol.isempty ()) {
+ vreltol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"RelTol\" not set, new value %3.1e is used",
+@@ -379,7 +379,7 @@
+ // Implementation of the option AbsTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vabstol = vodeopt.contents ("AbsTol");
+- if (vabstol.is_empty ()) {
++ if (vabstol.isempty ()) {
+ vabstol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"AbsTol\" not set, new value %3.1e is used",
+@@ -409,7 +409,7 @@
+ // The option NormControl will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnorm = vodeopt.contents ("NormControl");
+- if (!vnorm.is_empty ())
++ if (!vnorm.isempty ())
+ if (vnorm.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NormControl\" will be ignored by this solver");
+@@ -417,14 +417,14 @@
+ // The option NonNegative will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnneg = vodeopt.contents ("NonNegative");
+- if (!vnneg.is_empty ())
++ if (!vnneg.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NonNegative\" will be ignored by this solver");
+
+ // Implementation of the option OutputFcn has been finished, this
+ // option can be set by the user to another value than default value
+ vradaupltfun = vodeopt.contents ("OutputFcn");
+- if (vradaupltfun.is_empty () && nargout == 0) vradaupltfun = "odeplot";
++ if (vradaupltfun.isempty () && nargout == 0) vradaupltfun = "odeplot";
+
+ // Implementation of the option OutputSel has been finished, this
+ // option can be set by the user to another value than default value
+@@ -445,7 +445,7 @@
+ error_with_id ("OdePkg:InvalidOption",
+ "Fixed time stamps are not supported by this solver");
+ }
+- if (vinitstep.is_empty ()) {
++ if (vinitstep.isempty ()) {
+ vinitstep = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" not set, new value %3.1e is used",
+@@ -455,7 +455,7 @@
+ // Implementation of the option MaxStep has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxstep = vodeopt.contents ("MaxStep");
+- if (vmaxstep.is_empty () && args(1).length () == 2) {
++ if (vmaxstep.isempty () && args(1).length () == 2) {
+ vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxStep\" not set, new value %3.1e is used",
+@@ -471,19 +471,19 @@
+ // options can be set by the user to another value than default
+ vradaujacfun = vodeopt.contents ("Jacobian");
+ octave_idx_type vradaujac = 0; // We need to set this if no Jac available
+- if (!vradaujacfun.is_empty ()) vradaujac = 1;
++ if (!vradaujacfun.isempty ()) vradaujac = 1;
+
+ // The option JPattern will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vradaujacpat = vodeopt.contents ("JPattern");
+- if (!vradaujacpat.is_empty ())
++ if (!vradaujacpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"JPattern\" will be ignored by this solver");
+
+ // The option Vectorized will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vradauvectorize = vodeopt.contents ("Vectorized");
+- if (!vradauvectorize.is_empty ())
++ if (!vradauvectorize.isempty ())
+ if (vradauvectorize.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"Vectorized\" will be ignored by this solver");
+@@ -492,7 +492,7 @@
+ // options can be set by the user to another value than default
+ vradaumass = vodeopt.contents ("Mass");
+ octave_idx_type vradaumas = 0;
+- if (!vradaumass.is_empty ()) {
++ if (!vradaumass.isempty ()) {
+ vradaumas = 1;
+ if (vradaumass.is_function_handle () || vradaumass.is_inline_function ())
+ warning_with_id ("OdePkg:InvalidOption",
+@@ -502,7 +502,7 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ vradaumassstate = vodeopt.contents ("MStateDependence");
+- if (!vradaumassstate.is_empty ())
++ if (!vradaumassstate.isempty ())
+ if (vradaumassstate.string_value ().compare ("weak") != 0) // 'weak' is default
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MStateDependence\" will be ignored by this solver");
+@@ -510,14 +510,14 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmvpat = vodeopt.contents ("MvPattern");
+- if (!vmvpat.is_empty ())
++ if (!vmvpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MvPattern\" will be ignored by this solver");
+
+ // The option MassSingular will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmsing = vodeopt.contents ("MassSingular");
+- if (!vmsing.is_empty ())
++ if (!vmsing.isempty ())
+ if (vmsing.string_value ().compare ("maybe") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MassSingular\" will be ignored by this solver");
+@@ -525,21 +525,21 @@
+ // The option InitialSlope will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vinitslope = vodeopt.contents ("InitialSlope");
+- if (!vinitslope.is_empty ())
++ if (!vinitslope.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialSlope\" will be ignored by this solver");
+
+ // The option MaxOrder will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vmaxder = vodeopt.contents ("MaxOrder");
+- if (!vmaxder.is_empty ())
++ if (!vmaxder.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxOrder\" will be ignored by this solver");
+
+ // The option BDF will be ignored by this solver, the core Fortran
+ // solver doesn't support this option
+ octave_value vbdf = vodeopt.contents ("BDF");
+- if (!vbdf.is_empty ())
++ if (!vbdf.isempty ())
+ if (vbdf.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"BDF\" will be ignored by this solver");
+@@ -548,12 +548,12 @@
+ // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
+ // CAN HANDLE THESE OPTIONS
+ octave_value vntol = vodeopt.contents ("NewtonTol");
+- if (!vntol.is_empty ())
++ if (!vntol.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NewtonTol\" will be ignored by this solver");
+ octave_value vmaxnewton =
+ vodeopt.contents ("MaxNewtonIterations");
+- if (!vmaxnewton.is_empty ())
++ if (!vmaxnewton.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxNewtonIterations\" will be ignored by this solver");
+
+@@ -600,9 +600,9 @@
+ octave_value vtim = args(1).vector_value ()(0);
+ octave_value vsol = args(2);
+ odepkg_auxiliary_solstore (vtim, vsol, 0);
+- if (!vradaupltfun.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vradaupltfun.isempty ()) odepkg_auxiliary_evalplotfun
+ (vradaupltfun, vradauoutsel, args(1), args(2), vradauextarg, 0);
+- if (!vradauevefun.is_empty ())
++ if (!vradauevefun.isempty ())
+ odepkg_auxiliary_evaleventfun (vradauevefun, vtim, args(2), vradauextarg, 0);
+
+ // We are calling the core solver and solve the set of ODEs or DAEs
+@@ -639,9 +639,9 @@
+ octave_value vted = octave_value (XEND);
+ octave_value vfin = octave_value (vlastline);
+
+- if (!vradaupltfun.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vradaupltfun.isempty ()) odepkg_auxiliary_evalplotfun
+ (vradaupltfun, vradauoutsel, vted, vfin, vradauextarg, 2);
+- if (!vradauevefun.is_empty ()) odepkg_auxiliary_evaleventfun
++ if (!vradauevefun.isempty ()) odepkg_auxiliary_evaleventfun
+ (vradauevefun, vted, vfin, vradauextarg, 2);
+
+ // Get the stats information as an octave_scalar_map if the option 'Stats'
+@@ -667,9 +667,9 @@
+ vretmap.assign ("x", vtres);
+ vretmap.assign ("y", vyres);
+ vretmap.assign ("solver", "ode2r");
+- if (!vstatinfo.is_empty ()) // Event implementation
++ if (!vstatinfo.isempty ()) // Event implementation
+ vretmap.assign ("stats", vstatinfo);
+- if (!vradauevefun.is_empty ()) {
++ if (!vradauevefun.isempty ()) {
+ vretmap.assign ("ie", vradauevesol(0).cell_value ()(1));
+ vretmap.assign ("xe", vradauevesol(0).cell_value ()(2));
+ vretmap.assign ("ye", vradauevesol(0).cell_value ()(3));
+@@ -687,7 +687,7 @@
+ vretval(2) = vempty;
+ vretval(3) = vempty;
+ vretval(4) = vempty;
+- if (!vradauevefun.is_empty ()) {
++ if (!vradauevefun.isempty ()) {
+ vretval(2) = vradauevesol(0).cell_value ()(2);
+ vretval(3) = vradauevesol(0).cell_value ()(3);
+ vretval(4) = vradauevesol(0).cell_value ()(1);
+diff -r 1646adc7793b src/odepkg_octsolver_radau5.cc
+--- a/src/odepkg_octsolver_radau5.cc Sun Jan 20 20:52:16 2019 +0100
++++ b/src/odepkg_octsolver_radau5.cc Sun Jan 20 21:30:32 2019 +0100
+@@ -114,7 +114,7 @@
+ varin(0) = X; varin(1) = A;
+ for (octave_idx_type vcnt = 0; vcnt < vradau5extarg.length (); vcnt++)
+ varin(vcnt+2) = vradau5extarg(vcnt);
+- octave_value_list vout = feval (vradau5odefun.function_value (), varin, 1);
++ octave_value_list vout = octave::feval (vradau5odefun.function_value (), varin, 1);
+
+ // Return the results from the function evaluation to the Fortran
+ // solver, again copy them and don't just create a Fortran vector
+@@ -200,14 +200,14 @@
+ octave_value vy = octave_value (A);
+
+ // Check if an 'Events' function has been set by the user
+- if (!vradau5evefun.is_empty ()) {
++ if (!vradau5evefun.isempty ()) {
+ vradau5evesol = odepkg_auxiliary_evaleventfun
+ (vradau5evefun, vt, vy, vradau5extarg, 1);
+- if (!vradau5evesol(0).cell_value ()(0).is_empty ())
++ if (!vradau5evesol(0).cell_value ()(0).isempty ())
+ if (vradau5evesol(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = vradau5evesol(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = vradau5evesol(0).cell_value ()(3).matrix_value ();
+- vt = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vt = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vy = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ IRTRN = (vradau5evesol(0).cell_value ()(0).int_value () ? -1 : 0);
+ }
+@@ -219,7 +219,7 @@
+
+ // Check if an 'OutputFcn' has been set by the user (including the
+ // values of the options for 'OutputSel' and 'Refine')
+- if (!vradau5pltfun.is_empty ()) {
++ if (!vradau5pltfun.isempty ()) {
+ if (vradau5refine.int_value () > 0) {
+ ColumnVector B(N); double vtb = 0.0;
+ for (octave_idx_type vcnt = 1; vcnt < vradau5refine.int_value (); vcnt++) {
+@@ -320,8 +320,8 @@
+ if (nargin >= 4) {
+
+ // Fourth input argument != OdePkg option, need a default structure
+- if (!args(3).is_map ()) {
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ if (!args(3).isstruct ()) {
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
+ vradau5extarg(vcnt-3) = args(vcnt); // Save arguments in vradau5extarg
+@@ -331,7 +331,7 @@
+ else if (nargin > 4) {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "ode5r";
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
+ for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
+@@ -342,7 +342,7 @@
+ else {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "ode5r"; // Check structure
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+@@ -350,7 +350,7 @@
+ } // if (nargin >= 4)
+
+ else { // if nargin == 3, everything else has been checked before
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+
+@@ -362,7 +362,7 @@
+ // Implementation of the option RelTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vreltol = vodeopt.contents ("RelTol");
+- if (vreltol.is_empty ()) {
++ if (vreltol.isempty ()) {
+ vreltol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"RelTol\" not set, new value %3.1e is used",
+@@ -379,7 +379,7 @@
+ // Implementation of the option AbsTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vabstol = vodeopt.contents ("AbsTol");
+- if (vabstol.is_empty ()) {
++ if (vabstol.isempty ()) {
+ vabstol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"AbsTol\" not set, new value %3.1e is used",
+@@ -409,7 +409,7 @@
+ // The option NormControl will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnorm = vodeopt.contents ("NormControl");
+- if (!vnorm.is_empty ())
++ if (!vnorm.isempty ())
+ if (vnorm.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NormControl\" will be ignored by this solver");
+@@ -417,14 +417,14 @@
+ // The option NonNegative will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnneg = vodeopt.contents ("NonNegative");
+- if (!vnneg.is_empty ())
++ if (!vnneg.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NonNegative\" will be ignored by this solver");
+
+ // Implementation of the option OutputFcn has been finished, this
+ // option can be set by the user to another value than default value
+ vradau5pltfun = vodeopt.contents ("OutputFcn");
+- if (vradau5pltfun.is_empty () && nargout == 0) vradau5pltfun = "odeplot";
++ if (vradau5pltfun.isempty () && nargout == 0) vradau5pltfun = "odeplot";
+
+ // Implementation of the option OutputSel has been finished, this
+ // option can be set by the user to another value than default value
+@@ -445,7 +445,7 @@
+ error_with_id ("OdePkg:InvalidOption",
+ "Fixed time stamps are not supported by this solver");
+ }
+- if (vinitstep.is_empty ()) {
++ if (vinitstep.isempty ()) {
+ vinitstep = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" not set, new value %3.1e is used",
+@@ -455,7 +455,7 @@
+ // Implementation of the option MaxStep has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxstep = vodeopt.contents ("MaxStep");
+- if (vmaxstep.is_empty () && args(1).length () == 2) {
++ if (vmaxstep.isempty () && args(1).length () == 2) {
+ vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxStep\" not set, new value %3.1e is used",
+@@ -471,19 +471,19 @@
+ // options can be set by the user to another value than default
+ vradau5jacfun = vodeopt.contents ("Jacobian");
+ octave_idx_type vradau5jac = 0; // We need to set this if no Jac available
+- if (!vradau5jacfun.is_empty ()) vradau5jac = 1;
++ if (!vradau5jacfun.isempty ()) vradau5jac = 1;
+
+ // The option JPattern will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vradau5jacpat = vodeopt.contents ("JPattern");
+- if (!vradau5jacpat.is_empty ())
++ if (!vradau5jacpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"JPattern\" will be ignored by this solver");
+
+ // The option Vectorized will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vradau5vectorize = vodeopt.contents ("Vectorized");
+- if (!vradau5vectorize.is_empty ())
++ if (!vradau5vectorize.isempty ())
+ if (vradau5vectorize.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"Vectorized\" will be ignored by this solver");
+@@ -492,7 +492,7 @@
+ // options can be set by the user to another value than default
+ vradau5mass = vodeopt.contents ("Mass");
+ octave_idx_type vradau5mas = 0;
+- if (!vradau5mass.is_empty ()) {
++ if (!vradau5mass.isempty ()) {
+ vradau5mas = 1;
+ if (vradau5mass.is_function_handle () || vradau5mass.is_inline_function ())
+ warning_with_id ("OdePkg:InvalidOption",
+@@ -502,7 +502,7 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ vradau5massstate = vodeopt.contents ("MStateDependence");
+- if (!vradau5massstate.is_empty ())
++ if (!vradau5massstate.isempty ())
+ if (vradau5massstate.string_value ().compare ("weak") != 0) // 'weak' is default
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MStateDependence\" will be ignored by this solver");
+@@ -510,14 +510,14 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmvpat = vodeopt.contents ("MvPattern");
+- if (!vmvpat.is_empty ())
++ if (!vmvpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MvPattern\" will be ignored by this solver");
+
+ // The option MassSingular will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmsing = vodeopt.contents ("MassSingular");
+- if (!vmsing.is_empty ())
++ if (!vmsing.isempty ())
+ if (vmsing.string_value ().compare ("maybe") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MassSingular\" will be ignored by this solver");
+@@ -525,21 +525,21 @@
+ // The option InitialSlope will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vinitslope = vodeopt.contents ("InitialSlope");
+- if (!vinitslope.is_empty ())
++ if (!vinitslope.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialSlope\" will be ignored by this solver");
+
+ // The option MaxOrder will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vmaxder = vodeopt.contents ("MaxOrder");
+- if (!vmaxder.is_empty ())
++ if (!vmaxder.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxOrder\" will be ignored by this solver");
+
+ // The option BDF will be ignored by this solver, the core Fortran
+ // solver doesn't support this option
+ octave_value vbdf = vodeopt.contents ("BDF");
+- if (!vbdf.is_empty ())
++ if (!vbdf.isempty ())
+ if (vbdf.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"BDF\" will be ignored by this solver");
+@@ -547,7 +547,7 @@
+ // Implementation of the option NewtonTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vNTOL = vodeopt.contents ("NewtonTol");
+- if (vNTOL.is_empty ()) {
++ if (vNTOL.isempty ()) {
+ vNTOL = 0;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NewtonTol\" not set, default value is used");
+@@ -557,7 +557,7 @@
+ // option can be set by the user to another value than default value
+ octave_value vmaxnit =
+ vodeopt.contents ("MaxNewtonIterations");
+- if (vmaxnit.is_empty ()) {
++ if (vmaxnit.isempty ()) {
+ vmaxnit = 7; warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxNewtonIterations\" not set, default value 7 is used");
+ }
+@@ -611,9 +611,9 @@
+ octave_value vtim = args(1).vector_value ()(0);
+ octave_value vsol = args(2);
+ odepkg_auxiliary_solstore (vtim, vsol, 0);
+- if (!vradau5pltfun.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vradau5pltfun.isempty ()) odepkg_auxiliary_evalplotfun
+ (vradau5pltfun, vradau5outsel, args(1), args(2), vradau5extarg, 0);
+- if (!vradau5evefun.is_empty ())
++ if (!vradau5evefun.isempty ())
+ odepkg_auxiliary_evaleventfun (vradau5evefun, vtim, args(2), vradau5extarg, 0);
+
+ // octave_stdout << "X VALUE=" << X << XEND << std::endl;
+@@ -651,9 +651,9 @@
+ octave_value vted = octave_value (XEND);
+ octave_value vfin = octave_value (vlastline);
+
+- if (!vradau5pltfun.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vradau5pltfun.isempty ()) odepkg_auxiliary_evalplotfun
+ (vradau5pltfun, vradau5outsel, vted, vfin, vradau5extarg, 2);
+- if (!vradau5evefun.is_empty ()) odepkg_auxiliary_evaleventfun
++ if (!vradau5evefun.isempty ()) odepkg_auxiliary_evaleventfun
+ (vradau5evefun, vted, vfin, vradau5extarg, 2);
+
+ // Get the stats information as an octave_scalar_map if the option 'Stats'
+@@ -679,9 +679,9 @@
+ vretmap.assign ("x", vtres);
+ vretmap.assign ("y", vyres);
+ vretmap.assign ("solver", "ode5r");
+- if (!vstatinfo.is_empty ()) // Event implementation
++ if (!vstatinfo.isempty ()) // Event implementation
+ vretmap.assign ("stats", vstatinfo);
+- if (!vradau5evefun.is_empty ()) {
++ if (!vradau5evefun.isempty ()) {
+ vretmap.assign ("ie", vradau5evesol(0).cell_value ()(1));
+ vretmap.assign ("xe", vradau5evesol(0).cell_value ()(2));
+ vretmap.assign ("ye", vradau5evesol(0).cell_value ()(3));
+@@ -699,7 +699,7 @@
+ vretval(2) = vempty;
+ vretval(3) = vempty;
+ vretval(4) = vempty;
+- if (!vradau5evefun.is_empty ()) {
++ if (!vradau5evefun.isempty ()) {
+ vretval(2) = vradau5evesol(0).cell_value ()(2);
+ vretval(3) = vradau5evesol(0).cell_value ()(3);
+ vretval(4) = vradau5evesol(0).cell_value ()(1);
+diff -r 1646adc7793b src/odepkg_octsolver_rodas.cc
+--- a/src/odepkg_octsolver_rodas.cc Sun Jan 20 20:52:16 2019 +0100
++++ b/src/odepkg_octsolver_rodas.cc Sun Jan 20 21:30:32 2019 +0100
+@@ -293,7 +293,7 @@
+ varin(0) = X; varin(1) = A;
+ for (octave_idx_type vcnt = 0; vcnt < vrodasextarg.length (); vcnt++)
+ varin(vcnt+2) = vrodasextarg(vcnt);
+- octave_value_list vout = feval (vrodasodefun.function_value (), varin, 1);
++ octave_value_list vout = octave::feval (vrodasodefun.function_value (), varin, 1);
+
+ // Return the results from the function evaluation to the Fortran
+ // solver, again copy them and don't just create a Fortran vector
+@@ -401,14 +401,14 @@
+ octave_value vy = octave_value (A);
+
+ // Check if an 'Events' function has been set by the user
+- if (!vrodasevefun.is_empty ()) {
++ if (!vrodasevefun.isempty ()) {
+ vrodasevesol = odepkg_auxiliary_evaleventfun
+ (vrodasevefun, vt, vy, vrodasextarg, 1);
+- if (!vrodasevesol(0).cell_value ()(0).is_empty ())
++ if (!vrodasevesol(0).cell_value ()(0).isempty ())
+ if (vrodasevesol(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = vrodasevesol(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = vrodasevesol(0).cell_value ()(3).matrix_value ();
+- vt = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vt = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vy = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ IRTRN = (vrodasevesol(0).cell_value ()(0).int_value () ? -1 : 0);
+ }
+@@ -420,7 +420,7 @@
+
+ // Check if an 'OutputFcn' has been set by the user (including the
+ // values of the options for 'OutputSel' and 'Refine')
+- if (!vrodaspltfun.is_empty ()) {
++ if (!vrodaspltfun.isempty ()) {
+ if (vrodasrefine.int_value () > 0) {
+ ColumnVector B(N); double vtb = 0.0;
+ for (octave_idx_type vcnt = 1; vcnt < vrodasrefine.int_value (); vcnt++) {
+@@ -534,8 +534,8 @@
+ if (nargin >= 4) {
+
+ // Fourth input argument != OdePkg option, need a default structure
+- if (!args(3).is_map ()) {
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ if (!args(3).isstruct ()) {
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
+ vrodasextarg(vcnt-3) = args(vcnt); // Save arguments in vrodasextarg
+@@ -545,7 +545,7 @@
+ else if (nargin > 4) {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "oders";
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
+ for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
+@@ -556,7 +556,7 @@
+ else {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "oders"; // Check structure
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+@@ -564,7 +564,7 @@
+ } // if (nargin >= 4)
+
+ else { // if nargin == 3, everything else has been checked before
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+
+@@ -576,7 +576,7 @@
+ // Implementation of the option RelTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vreltol = vodeopt.contents ("RelTol");
+- if (vreltol.is_empty ()) {
++ if (vreltol.isempty ()) {
+ vreltol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"RelTol\" not set, new value %3.1e is used",
+@@ -593,7 +593,7 @@
+ // Implementation of the option AbsTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vabstol = vodeopt.contents ("AbsTol");
+- if (vabstol.is_empty ()) {
++ if (vabstol.isempty ()) {
+ vabstol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"AbsTol\" not set, new value %3.1e is used",
+@@ -623,7 +623,7 @@
+ // The option NormControl will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnorm = vodeopt.contents ("NormControl");
+- if (!vnorm.is_empty ())
++ if (!vnorm.isempty ())
+ if (vnorm.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NormControl\" will be ignored by this solver");
+@@ -631,14 +631,14 @@
+ // The option NonNegative will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnneg = vodeopt.contents ("NonNegative");
+- if (!vnneg.is_empty ())
++ if (!vnneg.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NonNegative\" will be ignored by this solver");
+
+ // Implementation of the option OutputFcn has been finished, this
+ // option can be set by the user to another value than default value
+ vrodaspltfun = vodeopt.contents ("OutputFcn");
+- if (vrodaspltfun.is_empty () && nargout == 0) vrodaspltfun = "odeplot";
++ if (vrodaspltfun.isempty () && nargout == 0) vrodaspltfun = "odeplot";
+
+ // Implementation of the option OutputSel has been finished, this
+ // option can be set by the user to another value than default value
+@@ -659,7 +659,7 @@
+ error_with_id ("OdePkg:InvalidOption",
+ "Fixed time stamps are not supported by this solver");
+ }
+- if (vinitstep.is_empty ()) {
++ if (vinitstep.isempty ()) {
+ vinitstep = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" not set, new value %3.1e is used",
+@@ -669,7 +669,7 @@
+ // Implementation of the option MaxStep has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxstep = vodeopt.contents ("MaxStep");
+- if (vmaxstep.is_empty () && args(1).length () == 2) {
++ if (vmaxstep.isempty () && args(1).length () == 2) {
+ vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxStep\" not set, new value %3.1e is used",
+@@ -685,19 +685,19 @@
+ // options can be set by the user to another value than default
+ vrodasjacfun = vodeopt.contents ("Jacobian");
+ octave_idx_type vrodasjac = 0; // We need to set this if no Jac available
+- if (!vrodasjacfun.is_empty ()) vrodasjac = 1;
++ if (!vrodasjacfun.isempty ()) vrodasjac = 1;
+
+ // The option JPattern will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vrodasjacpat = vodeopt.contents ("JPattern");
+- if (!vrodasjacpat.is_empty ())
++ if (!vrodasjacpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"JPattern\" will be ignored by this solver");
+
+ // The option Vectorized will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vrodasvectorize = vodeopt.contents ("Vectorized");
+- if (!vrodasvectorize.is_empty ())
++ if (!vrodasvectorize.isempty ())
+ if (vrodasvectorize.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"Vectorized\" will be ignored by this solver");
+@@ -706,7 +706,7 @@
+ // options can be set by the user to another value than default
+ vrodasmass = vodeopt.contents ("Mass");
+ octave_idx_type vrodasmas = 0;
+- if (!vrodasmass.is_empty ()) {
++ if (!vrodasmass.isempty ()) {
+ vrodasmas = 1;
+ if (vrodasmass.is_function_handle () || vrodasmass.is_inline_function ())
+ warning_with_id ("OdePkg:InvalidOption",
+@@ -716,7 +716,7 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ vrodasmassstate = vodeopt.contents ("MStateDependence");
+- if (!vrodasmassstate.is_empty ())
++ if (!vrodasmassstate.isempty ())
+ if (vrodasmassstate.string_value ().compare ("weak") != 0) // 'weak' is default
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MStateDependence\" will be ignored by this solver");
+@@ -724,14 +724,14 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmvpat = vodeopt.contents ("MvPattern");
+- if (!vmvpat.is_empty ())
++ if (!vmvpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MvPattern\" will be ignored by this solver");
+
+ // The option MassSingular will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmsing = vodeopt.contents ("MassSingular");
+- if (!vmsing.is_empty ())
++ if (!vmsing.isempty ())
+ if (vmsing.string_value ().compare ("maybe") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MassSingular\" will be ignored by this solver");
+@@ -739,21 +739,21 @@
+ // The option InitialSlope will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vinitslope = vodeopt.contents ("InitialSlope");
+- if (!vinitslope.is_empty ())
++ if (!vinitslope.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialSlope\" will be ignored by this solver");
+
+ // The option MaxOrder will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vmaxder = vodeopt.contents ("MaxOrder");
+- if (!vmaxder.is_empty ())
++ if (!vmaxder.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxOrder\" will be ignored by this solver");
+
+ // The option BDF will be ignored by this solver, the core Fortran
+ // solver doesn't support this option
+ octave_value vbdf = vodeopt.contents ("BDF");
+- if (!vbdf.is_empty ())
++ if (!vbdf.isempty ())
+ if (vbdf.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"BDF\" will be ignored by this solver");
+@@ -761,12 +761,12 @@
+ // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
+ // CAN HANDLE THESE OPTIONS
+ octave_value vntol = vodeopt.contents ("NewtonTol");
+- if (!vntol.is_empty ())
++ if (!vntol.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NewtonTol\" will be ignored by this solver");
+ octave_value vmaxnewton =
+ vodeopt.contents ("MaxNewtonIterations");
+- if (!vmaxnewton.is_empty ())
++ if (!vmaxnewton.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxNewtonIterations\" will be ignored by this solver");
+
+@@ -813,9 +813,9 @@
+ octave_value vtim = args(1).vector_value ()(0);
+ octave_value vsol = args(2);
+ odepkg_auxiliary_solstore (vtim, vsol, 0);
+- if (!vrodaspltfun.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vrodaspltfun.isempty ()) odepkg_auxiliary_evalplotfun
+ (vrodaspltfun, vrodasoutsel, args(1), args(2), vrodasextarg, 0);
+- if (!vrodasevefun.is_empty ())
++ if (!vrodasevefun.isempty ())
+ odepkg_auxiliary_evaleventfun (vrodasevefun, vtim, args(2), vrodasextarg, 0);
+
+ // We are calling the core solver and solve the set of ODEs or DAEs
+@@ -852,9 +852,9 @@
+ octave_value vted = octave_value (XEND);
+ octave_value vfin = octave_value (vlastline);
+
+- if (!vrodaspltfun.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vrodaspltfun.isempty ()) odepkg_auxiliary_evalplotfun
+ (vrodaspltfun, vrodasoutsel, vted, vfin, vrodasextarg, 2);
+- if (!vrodasevefun.is_empty ()) odepkg_auxiliary_evaleventfun
++ if (!vrodasevefun.isempty ()) odepkg_auxiliary_evaleventfun
+ (vrodasevefun, vted, vfin, vrodasextarg, 2);
+
+ // Get the stats information as an octave_scalar_map if the option 'Stats'
+@@ -879,9 +879,9 @@
+ vretmap.assign ("x", vtres);
+ vretmap.assign ("y", vyres);
+ vretmap.assign ("solver", "oders");
+- if (!vstatinfo.is_empty ()) // Event implementation
++ if (!vstatinfo.isempty ()) // Event implementation
+ vretmap.assign ("stats", vstatinfo);
+- if (!vrodasevefun.is_empty ()) {
++ if (!vrodasevefun.isempty ()) {
+ vretmap.assign ("ie", vrodasevesol(0).cell_value ()(1));
+ vretmap.assign ("xe", vrodasevesol(0).cell_value ()(2));
+ vretmap.assign ("ye", vrodasevesol(0).cell_value ()(3));
+@@ -899,7 +899,7 @@
+ vretval(2) = vempty;
+ vretval(3) = vempty;
+ vretval(4) = vempty;
+- if (!vrodasevefun.is_empty ()) {
++ if (!vrodasevefun.isempty ()) {
+ vretval(2) = vrodasevesol(0).cell_value ()(2);
+ vretval(3) = vrodasevesol(0).cell_value ()(3);
+ vretval(4) = vrodasevesol(0).cell_value ()(1);
+diff -r 1646adc7793b src/odepkg_octsolver_seulex.cc
+--- a/src/odepkg_octsolver_seulex.cc Sun Jan 20 20:52:16 2019 +0100
++++ b/src/odepkg_octsolver_seulex.cc Sun Jan 20 21:30:32 2019 +0100
+@@ -117,7 +117,7 @@
+ varin(0) = X; varin(1) = A;
+ for (octave_idx_type vcnt = 0; vcnt < vseulexextarg.length (); vcnt++)
+ varin(vcnt+2) = vseulexextarg(vcnt);
+- octave_value_list vout = feval (vseulexodefun.function_value (), varin, 1);
++ octave_value_list vout = octave::feval (vseulexodefun.function_value (), varin, 1);
+
+ // Return the results from the function evaluation to the Fortran
+ // solver, again copy them and don't just create a Fortran vector
+@@ -205,14 +205,14 @@
+
+ vseulexevebrk = false;
+ // Check if an 'Events' function has been set by the user
+- if (!vseulexevefun.is_empty ()) {
++ if (!vseulexevefun.isempty ()) {
+ vseulexevesol = odepkg_auxiliary_evaleventfun
+ (vseulexevefun, vt, vy, vseulexextarg, 1);
+- if (!vseulexevesol(0).cell_value ()(0).is_empty ())
++ if (!vseulexevesol(0).cell_value ()(0).isempty ())
+ if (vseulexevesol(0).cell_value ()(0).int_value () == 1) {
+ ColumnVector vttmp = vseulexevesol(0).cell_value ()(2).column_vector_value ();
+ Matrix vrtmp = vseulexevesol(0).cell_value ()(3).matrix_value ();
+- vt = vttmp.extract (vttmp.length () - 1, vttmp.length () - 1);
++ vt = vttmp.extract (vttmp.numel () - 1, vttmp.numel () - 1);
+ vy = vrtmp.extract (vrtmp.rows () - 1, 0, vrtmp.rows () - 1, vrtmp.cols () - 1);
+ IRTRN = (vseulexevesol(0).cell_value ()(0).int_value () ? -1 : 0);
+ vseulexevebrk = true;
+@@ -226,7 +226,7 @@
+ // Check if an 'OutputFcn' has been set by the user (including the
+ // values of the options for 'OutputSel' and 'Refine')
+ vseulexpltbrk = false;
+- if (!vseulexpltfun.is_empty ()) {
++ if (!vseulexpltfun.isempty ()) {
+ if (vseulexrefine.int_value () > 0) {
+ ColumnVector B(N); double vtb = 0.0;
+ for (octave_idx_type vcnt = 1; vcnt < vseulexrefine.int_value (); vcnt++) {
+@@ -328,8 +328,8 @@
+ if (nargin >= 4) {
+
+ // Fourth input argument != OdePkg option, need a default structure
+- if (!args(3).is_map ()) {
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ if (!args(3).isstruct ()) {
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ for (octave_idx_type vcnt = 3; vcnt < nargin; vcnt++)
+ vseulexextarg(vcnt-3) = args(vcnt); // Save arguments in vseulexextarg
+@@ -339,7 +339,7 @@
+ else if (nargin > 4) {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "odesx";
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create structure from args(4)
+ for (octave_idx_type vcnt = 4; vcnt < nargin; vcnt++)
+@@ -350,7 +350,7 @@
+ else {
+ octave_value_list varin;
+ varin(0) = args(3); varin(1) = "odesx"; // Check structure
+- octave_value_list tmp = feval ("odepkg_structure_check", varin, 1);
++ octave_value_list tmp = octave::feval ("odepkg_structure_check", varin, 1);
+ if (error_state) return (vretval);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+@@ -358,7 +358,7 @@
+ } // if (nargin >= 4)
+
+ else { // if nargin == 3, everything else has been checked before
+- octave_value_list tmp = feval ("odeset", tmp, 1);
++ octave_value_list tmp = octave::feval ("odeset", tmp, 1);
+ vodeopt = tmp(0).scalar_map_value (); // Create a default structure
+ }
+
+@@ -370,7 +370,7 @@
+ // Implementation of the option RelTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vreltol = vodeopt.contents ("RelTol");
+- if (vreltol.is_empty ()) {
++ if (vreltol.isempty ()) {
+ vreltol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"RelTol\" not set, new value %3.1e is used",
+@@ -387,7 +387,7 @@
+ // Implementation of the option AbsTol has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vabstol = vodeopt.contents ("AbsTol");
+- if (vabstol.is_empty ()) {
++ if (vabstol.isempty ()) {
+ vabstol = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"AbsTol\" not set, new value %3.1e is used",
+@@ -417,7 +417,7 @@
+ // The option NormControl will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnorm = vodeopt.contents ("NormControl");
+- if (!vnorm.is_empty ())
++ if (!vnorm.isempty ())
+ if (vnorm.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NormControl\" will be ignored by this solver");
+@@ -425,14 +425,14 @@
+ // The option NonNegative will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vnneg = vodeopt.contents ("NonNegative");
+- if (!vnneg.is_empty ())
++ if (!vnneg.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NonNegative\" will be ignored by this solver");
+
+ // Implementation of the option OutputFcn has been finished, this
+ // option can be set by the user to another value than default value
+ vseulexpltfun = vodeopt.contents ("OutputFcn");
+- if (vseulexpltfun.is_empty () && nargout == 0) vseulexpltfun = "odeplot";
++ if (vseulexpltfun.isempty () && nargout == 0) vseulexpltfun = "odeplot";
+
+ // Implementation of the option OutputSel has been finished, this
+ // option can be set by the user to another value than default value
+@@ -453,7 +453,7 @@
+ error_with_id ("OdePkg:InvalidOption",
+ "Fixed time stamps are not supported by this solver");
+ }
+- if (vinitstep.is_empty ()) {
++ if (vinitstep.isempty ()) {
+ vinitstep = 1.0e-6;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialStep\" not set, new value %3.1e is used",
+@@ -463,7 +463,7 @@
+ // Implementation of the option MaxStep has been finished, this
+ // option can be set by the user to another value than default value
+ octave_value vmaxstep = vodeopt.contents ("MaxStep");
+- if (vmaxstep.is_empty () && args(1).length () == 2) {
++ if (vmaxstep.isempty () && args(1).length () == 2) {
+ vmaxstep = (args(1).vector_value ()(1) - args(1).vector_value ()(0)) / 12.5;
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxStep\" not set, new value %3.1e is used",
+@@ -479,19 +479,19 @@
+ // options can be set by the user to another value than default
+ vseulexjacfun = vodeopt.contents ("Jacobian");
+ octave_idx_type vseulexjac = 0; // We need to set this if no Jac available
+- if (!vseulexjacfun.is_empty ()) vseulexjac = 1;
++ if (!vseulexjacfun.isempty ()) vseulexjac = 1;
+
+ // The option JPattern will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vseulexjacpat = vodeopt.contents ("JPattern");
+- if (!vseulexjacpat.is_empty ())
++ if (!vseulexjacpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"JPattern\" will be ignored by this solver");
+
+ // The option Vectorized will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vseulexvectorize = vodeopt.contents ("Vectorized");
+- if (!vseulexvectorize.is_empty ())
++ if (!vseulexvectorize.isempty ())
+ if (vseulexvectorize.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"Vectorized\" will be ignored by this solver");
+@@ -500,7 +500,7 @@
+ // options can be set by the user to another value than default
+ vseulexmass = vodeopt.contents ("Mass");
+ octave_idx_type vseulexmas = 0;
+- if (!vseulexmass.is_empty ()) {
++ if (!vseulexmass.isempty ()) {
+ vseulexmas = 1;
+ if (vseulexmass.is_function_handle () || vseulexmass.is_inline_function ())
+ warning_with_id ("OdePkg:InvalidOption",
+@@ -510,7 +510,7 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ vseulexmassstate = vodeopt.contents ("MStateDependence");
+- if (!vseulexmassstate.is_empty ())
++ if (!vseulexmassstate.isempty ())
+ if (vseulexmassstate.string_value ().compare ("weak") != 0) // 'weak' is default
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MStateDependence\" will be ignored by this solver");
+@@ -518,14 +518,14 @@
+ // The option MStateDependence will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmvpat = vodeopt.contents ("MvPattern");
+- if (!vmvpat.is_empty ())
++ if (!vmvpat.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MvPattern\" will be ignored by this solver");
+
+ // The option MassSingular will be ignored by this solver, the
+ // core Fortran solver doesn't support this option
+ octave_value vmsing = vodeopt.contents ("MassSingular");
+- if (!vmsing.is_empty ())
++ if (!vmsing.isempty ())
+ if (vmsing.string_value ().compare ("maybe") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MassSingular\" will be ignored by this solver");
+@@ -533,21 +533,21 @@
+ // The option InitialSlope will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vinitslope = vodeopt.contents ("InitialSlope");
+- if (!vinitslope.is_empty ())
++ if (!vinitslope.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"InitialSlope\" will be ignored by this solver");
+
+ // The option MaxOrder will be ignored by this solver, the core
+ // Fortran solver doesn't support this option
+ octave_value vmaxder = vodeopt.contents ("MaxOrder");
+- if (!vmaxder.is_empty ())
++ if (!vmaxder.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxOrder\" will be ignored by this solver");
+
+ // The option BDF will be ignored by this solver, the core Fortran
+ // solver doesn't support this option
+ octave_value vbdf = vodeopt.contents ("BDF");
+- if (!vbdf.is_empty ())
++ if (!vbdf.isempty ())
+ if (vbdf.string_value ().compare ("off") != 0)
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"BDF\" will be ignored by this solver");
+@@ -555,12 +555,12 @@
+ // this solver, IT NEEDS TO BE CHECKED IF THE FORTRAN CORE SOLVER
+ // CAN HANDLE THESE OPTIONS
+ octave_value vntol = vodeopt.contents ("NewtonTol");
+- if (!vntol.is_empty ())
++ if (!vntol.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"NewtonTol\" will be ignored by this solver");
+ octave_value vmaxnewton =
+ vodeopt.contents ("MaxNewtonIterations");
+- if (!vmaxnewton.is_empty ())
++ if (!vmaxnewton.isempty ())
+ warning_with_id ("OdePkg:InvalidOption",
+ "Option \"MaxNewtonIterations\" will be ignored by this solver");
+
+@@ -608,9 +608,9 @@
+ octave_value vtim = args(1).vector_value ()(0);
+ octave_value vsol = args(2);
+ odepkg_auxiliary_solstore (vtim, vsol, 0);
+- if (!vseulexpltfun.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vseulexpltfun.isempty ()) odepkg_auxiliary_evalplotfun
+ (vseulexpltfun, vseulexoutsel, args(1), args(2), vseulexextarg, 0);
+- if (!vseulexevefun.is_empty ())
++ if (!vseulexevefun.isempty ())
+ odepkg_auxiliary_evaleventfun (vseulexevefun, vtim, args(2), vseulexextarg, 0);
+
+ // We are calling the core solver and solve the set of ODEs or DAEs
+@@ -651,9 +651,9 @@
+ octave_value vted = octave_value (XEND);
+ octave_value vfin = octave_value (vlastline);
+
+- if (!vseulexpltfun.is_empty ()) odepkg_auxiliary_evalplotfun
++ if (!vseulexpltfun.isempty ()) odepkg_auxiliary_evalplotfun
+ (vseulexpltfun, vseulexoutsel, vted, vfin, vseulexextarg, 2);
+- if (!vseulexevefun.is_empty ()) odepkg_auxiliary_evaleventfun
++ if (!vseulexevefun.isempty ()) odepkg_auxiliary_evaleventfun
+ (vseulexevefun, vted, vfin, vseulexextarg, 2);
+
+ // Get the stats information as an octave_scalar_map if the option 'Stats'
+@@ -678,9 +678,9 @@
+ vretmap.assign ("x", vtres);
+ vretmap.assign ("y", vyres);
+ vretmap.assign ("solver", "odesx");
+- if (!vstatinfo.is_empty ()) // Event implementation
++ if (!vstatinfo.isempty ()) // Event implementation
+ vretmap.assign ("stats", vstatinfo);
+- if (!vseulexevefun.is_empty ()) {
++ if (!vseulexevefun.isempty ()) {
+ vretmap.assign ("ie", vseulexevesol(0).cell_value ()(1));
+ vretmap.assign ("xe", vseulexevesol(0).cell_value ()(2));
+ vretmap.assign ("ye", vseulexevesol(0).cell_value ()(3));
+@@ -698,7 +698,7 @@
+ vretval(2) = vempty;
+ vretval(3) = vempty;
+ vretval(4) = vempty;
+- if (!vseulexevefun.is_empty ()) {
++ if (!vseulexevefun.isempty ()) {
+ vretval(2) = vseulexevesol(0).cell_value ()(2);
+ vretval(3) = vseulexevesol(0).cell_value ()(3);
+ vretval(4) = vseulexevesol(0).cell_value ()(1);
diff -r 3c2ecfd52069 -r 79edc3a96749 src/of-specfun-1-cross-fixes.patch
--- a/src/of-specfun-1-cross-fixes.patch Sun Jan 20 17:41:29 2019 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-diff -ur specfun.orig/src/Makefile specfun/src/Makefile
---- specfun.orig/src/Makefile 2015-12-26 20:11:36.382164834 -0500
-+++ specfun/src/Makefile 2015-12-26 20:12:17.449868085 -0500
-@@ -1,6 +1,8 @@
-+MKOCTFILE ?= mkoctfile
-+
- all: ellipj.oct
-
- %.oct: %.cc
-- mkoctfile -s $<
-+ $(MKOCTFILE) -s $<
-
- clean: ; -rm *.o core octave-core *.oct *~
diff -r 3c2ecfd52069 -r 79edc3a96749 src/of-specfun-1-deprecated.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/of-specfun-1-deprecated.patch Mon Jan 21 08:47:10 2019 -0500
@@ -0,0 +1,1099 @@
+# HG changeset patch
+# User carandraug
+# Date 1367241519 0
+# Mon Apr 29 13:18:39 2013 +0000
+# Node ID fba373975f9fbf1ab368727b3243681d8e8010da
+# Parent 218107f7d15193bc2d88071cf747388091783a83
+specfun: removing ellipj, ellipke, and expint (merged into octave core)
+(grafted from 153e6946b5cb58c22af6a28cbb7c37d9fdf4a892)
+
+diff -r 218107f7d151 -r fba373975f9f inst/ellipke.m
+--- a/inst/ellipke.m Thu Dec 15 02:18:02 2011 +0000
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,125 +0,0 @@
+-## Copyright (C) 2001 David Billinghurst
+-##
+-## 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
+-## the Free Software Foundation; either version 3 of the License, or
+-## (at your option) any later version.
+-##
+-## This program is distributed in the hope that it will be useful,
+-## but WITHOUT ANY WARRANTY; without even the implied warranty of
+-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-## GNU General Public License for more details.
+-##
+-## You should have received a copy of the GNU General Public License
+-## along with this program; If not, see .
+-
+-## -*- texinfo -*-
+-## @deftypefn {Function File} {[@var{k}, @var{e}] =} ellipke (@var{m}[,@var{tol}])
+-## Compute complete elliptic integral of first K(@var{m}) and second E(@var{m}).
+-##
+-## @var{m} is either real array or scalar with 0 <= m <= 1
+-##
+-## @var{tol} will be ignored (@sc{Matlab} uses this to allow faster, less
+-## accurate approximation)
+-##
+-## Ref: Abramowitz, Milton and Stegun, Irene A. Handbook of Mathematical
+-## Functions, Dover, 1965, Chapter 17.
+-## @seealso{ellipj}
+-## @end deftypefn
+-
+-## Author: David Billinghurst
+-## Created: 31 January 2001
+-## 2001-02-01 Paul Kienzle
+-## * vectorized
+-## * included function name in error messages
+-## 2003-1-18 Jaakko Ruohio
+-## * extended for m < 0
+-
+-function [k,e] = ellipke( m )
+-
+- if (nargin < 1 || nargin > 2)
+- print_usage;
+- endif
+-
+- k = e = zeros(size(m));
+- m = m(:);
+- if any(~isreal(m))
+- error("ellipke must have real m");
+- endif
+- if any(m>1)
+- error("ellipke must have m <= 1");
+- endif
+-
+- Nmax = 16;
+- idx = find(m == 1);
+- if (!isempty(idx))
+- k(idx) = Inf;
+- e(idx) = 1.0;
+- endif
+-
+- idx = find(m == -Inf);
+- if (!isempty(idx))
+- k(idx) = 0.0;
+- e(idx) = Inf;
+- endif
+-
+- ## Arithmetic-Geometric Mean (AGM) algorithm
+- ## ( Abramowitz and Stegun, Section 17.6 )
+- idx = find(m != 1 & m != -Inf);
+- if (!isempty(idx))
+- idx_neg = find(m < 0 & m != -Inf);
+- mult_k = 1./sqrt(1-m(idx_neg));
+- mult_e = sqrt(1-m(idx_neg));
+- m(idx_neg) = -m(idx_neg)./(1-m(idx_neg));
+- a = ones(length(idx),1);
+- b = sqrt(1.0-m(idx));
+- c = sqrt(m(idx));
+- f = 0.5;
+- sum = f*c.*c;
+- for n = 2:Nmax
+- t = (a+b)/2;
+- c = (a-b)/2;
+- b = sqrt(a.*b);
+- a = t;
+- f = f * 2;
+- sum = sum + f*c.*c;
+- if all(c./a < eps), break; endif
+- endfor
+- if n >= Nmax, error("ellipke: not enough workspace"); endif
+- k(idx) = 0.5*pi./a;
+- e(idx) = 0.5*pi.*(1.0-sum)./a;
+- k(idx_neg) = mult_k.*k(idx_neg);
+- e(idx_neg) = mult_e.*e(idx_neg);
+- endif
+-
+-endfunction
+-
+-%!test
+-%! ## Test complete elliptic functions of first and second kind
+-%! ## against "exact" solution from Mathematica 3.0
+-%! ##
+-%! ## David Billinghurst
+-%! ## 1 February 2001
+-%! m = [0.0; 0.01; 0.1; 0.5; 0.9; 0.99; 1.0 ];
+-%! [k,e] = ellipke(m);
+-%!
+-%! # K(1.0) is really infinity - see below
+-%! K = [
+-%! 1.5707963267948966192;
+-%! 1.5747455615173559527;
+-%! 1.6124413487202193982;
+-%! 1.8540746773013719184;
+-%! 2.5780921133481731882;
+-%! 3.6956373629898746778;
+-%! 0.0 ];
+-%! E = [
+-%! 1.5707963267948966192;
+-%! 1.5668619420216682912;
+-%! 1.5307576368977632025;
+-%! 1.3506438810476755025;
+-%! 1.1047747327040733261;
+-%! 1.0159935450252239356;
+-%! 1.0 ];
+-%! if k(7)==Inf, k(7)=0.0; endif;
+-%! assert(K,k,8*eps);
+-%! assert(E,e,8*eps);
+diff -r 218107f7d151 -r fba373975f9f inst/expint.m
+--- a/inst/expint.m Thu Dec 15 02:18:02 2011 +0000
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,34 +0,0 @@
+-## Copyright (C) 2006 Sylvain Pelissier
+-##
+-## 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
+-## the Free Software Foundation; either version 3 of the License, or
+-## (at your option) any later version.
+-##
+-## This program is distributed in the hope that it will be useful,
+-## but WITHOUT ANY WARRANTY; without even the implied warranty of
+-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-## GNU General Public License for more details.
+-##
+-## You should have received a copy of the GNU General Public License
+-## along with this program; If not, see .
+-
+-## -*- texinfo -*-
+-## @deftypefn {Function File} {@var{y} =} expint (@var{x})
+-## Compute the exponential integral,
+-## @verbatim
+-## infinity
+-## /
+-## expint(x) = | exp(t)/t dt
+-## /
+-## x
+-## @end verbatim
+-## @seealso{expint_E1, expint_Ei}
+-## @end deftypefn
+-
+-function y = expint(x)
+- if (nargin != 1)
+- print_usage;
+- endif
+- y = expint_E1(x);
+-endfunction
+diff -r 218107f7d151 -r fba373975f9f src/Makefile
+--- a/src/Makefile Thu Dec 15 02:18:02 2011 +0000
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,6 +0,0 @@
+-all: ellipj.oct
+-
+-%.oct: %.cc
+- mkoctfile -s $<
+-
+-clean: ; -rm *.o core octave-core *.oct *~
+diff -r 218107f7d151 -r fba373975f9f src/ellipj.cc
+--- a/src/ellipj.cc Thu Dec 15 02:18:02 2011 +0000
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,909 +0,0 @@
+-/*
+- Copyright (C) 2001 Leopoldo Cerbaro
+-
+- 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
+- the Free Software Foundation; either version 3 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; If not, see .
+-
+- Compute the Jacobi elliptic functions sn(u|m), cn(u|m) and dn(u|m) for
+- argument u (real or complex) and parameter m.
+-
+- usage: [sn,cn,dn] = ellipj(u,m[,tol])
+-
+- u and can be complex.
+- m is restricted to 0 <= m <= 1.
+- They can be scalars, matrix and scalar, scalar and matrix,
+- column and row, conformant matrices.
+-
+- modified so u can be complex. Leopoldo Cerbaro redbliss@libero.it
+-
+- Ref: Abramowitz, Milton and Stegun, Irene A
+- Handbook of Mathematical Functions, Dover, 1965
+- Chapter 16 (Sections 16.4, 16.13 and 16.15)
+-
+- Based upon ellipj.m made by David Billinghurst
+- and besselj.cc
+-
+- Author: Leopoldo Cerbaro
+- Created: 15 December 2001
+-*/
+-
+-#include "oct.h"
+-#include "lo-ieee.h" /* for octave_NaN */
+-
+-static void
+-gripe_ellipj_arg ( const char *arg)
+-{
+- error ("ellipj: expecting scalar or matrix as %s argument", arg);
+-}
+-
+-const double eps = 2.220446049e-16;
+-const int Nmax = 16;
+-
+-static void
+-sncndn ( double u, double m, double& sn, double& cn, double& dn, double& err) {
+-/* real */
+-double sqrt_eps, m1, t=0., si_u, co_u, se_u, ta_u, b, c[Nmax], a[Nmax], phi;
+-int n, Nn, ii;
+-
+- if (m < 0. || m > 1.) {
+- warning ("ellipj: expecting 0. <= m <= 1."); /* -lc- */
+- sn = cn = dn = lo_ieee_nan_value ();
+- return;
+- }
+- sqrt_eps = sqrt(eps);
+- if (m < sqrt_eps) {
+- /* # For small m, ( Abramowitz and Stegun, Section 16.13 ) */
+- /*{{{*/
+- si_u = sin(u);
+- co_u = cos(u);
+- t = 0.25*m*(u-si_u*co_u);
+- sn = si_u - t * co_u;
+- cn = co_u + t * si_u;
+- dn = 1.0 - 0.5*m*si_u*si_u;
+-/*}}}*/
+- } else if ( (1.0 - m) < sqrt_eps ) {
+- /* For m1 = (1-m) small ( Abramowitz and Stegun, Section 16.15 ) */
+- /*{{{*/
+- m1 = 1.0-m;
+- si_u = sinh(u);
+- co_u = cosh(u);
+- ta_u = tanh(u);
+- se_u = 1.0/co_u;
+- sn = ta_u + 0.25*m1*(si_u*co_u-u)*se_u*se_u;
+- cn = se_u - 0.25*m1*(si_u*co_u-u)*ta_u*se_u;
+- dn = se_u + 0.25*m1*(si_u*co_u+u)*ta_u*se_u;
+-/*}}}*/
+- } else {
+- /*{{{*/
+- /*
+- // Arithmetic-Geometric Mean (AGM) algorithm
+- // ( Abramowitz and Stegun, Section 16.4 )
+- */
+-
+- a[0] = 1.0;
+- b = sqrt(1.0-m);
+- c[0] = sqrt(m);
+- for (n = 1; n= Nmax-1) {
+- // fprintf(stderr, "Not enough workspace\n");
+- err = 1.;
+- return;
+- }
+- Nn = n;
+- for ( ii = 1; n>0; ii = ii*2, --n) ; // pow(2, Nn)
+- phi = ii*a[Nn]*u;
+- for ( n = Nn; n > 0; --n) {
+- t = phi;
+- phi = (asin((c[n]/a[n])* sin(phi))+phi)/2.;
+- }
+- sn = sin(phi);
+- cn = cos(phi);
+- dn = cn/cos(t-phi);
+-/*}}}*/
+- }
+- return;
+-}
+-
+-static void
+-sncndn ( Complex& u, double m,
+- Complex& sn, Complex& cn, Complex& dn, double& err) {
+-double m1 = 1.-m, ss1, cc1, dd1;
+-
+- sncndn( imag(u), m1, ss1, cc1, dd1, err);
+- if ( real(u) == 0.) {
+- /* u is pure imag: Jacoby imag. transf. */
+- /*{{{*/
+- sn = Complex (0. , ss1/cc1);
+- cn = 1/cc1; // cn.imag = 0.;
+- dn = dd1/cc1; // dn.imag = 0.;
+- /*}}}*/
+- } else {
+- /* u is generic complex */
+- /*{{{*/
+- double ss, cc, dd, ddd;
+-
+- sncndn( real(u), m, ss, cc, dd, err);
+- ddd = cc1*cc1 + m*ss*ss*ss1*ss1;
+- sn = Complex (ss*dd1/ddd, cc*dd*ss1*cc1/ddd);
+- cn = Complex (cc*cc1/ddd, -ss*dd*ss1*dd1/ddd);
+- dn = Complex (dd*cc1*dd1/ddd, -m*ss*cc*ss1/ddd);
+- /*}}}*/
+- }
+- return;
+-}
+-
+-DEFUN_DLD (ellipj, args, nargout,
+- "-*- texinfo -*-\n\
+-@deftypefn {Loadable Function} {[@var{sn}, @var{cn}, @var{dn}] =} \
+-ellipj (@var{u}, @var{m}, @var{err})\n\
+-Compute the Jacobi elliptic functions sn, cn, dn of complex argument and real parameter.\n\
+-\n\
+-If @var{m} is a scalar, the results are the same size as @var{u}.\n\
+-If @var{u} is a scalar, the results are the same size as @var{m}.\n\
+-If @var{u} is a column vector and @var{m} is a row vector, the\n\
+-results are matrices with @code{length (@var{u})} rows and\n\
+-@code{length (@var{m})} columns. Otherwise, @var{u} and\n\
+-@var{m} must conform and the results will be the same size.\n\
+-\n\
+-The value of @var{u} may be complex.\n\
+-The value of @var{m} must be 0 <= m <= 1. .\n\
+-\n\
+-If requested, @var{err} contains the following status information\n\
+-and is the same size as the result.\n\
+-\n\
+-@enumerate 0\n\
+-@item\n\
+-Normal return.\n\
+-@item\n\
+-Error---no computation, algorithm termination condition not met,\n\
+-return @code{NaN}.\n\
+-@end enumerate\n\
+-@end deftypefn")
+-{
+- octave_value_list retval;
+-
+- int nargin = args.length ();
+-
+- if (nargin == 2 ) {
+- octave_value u_arg = args(0);
+- octave_value m_arg = args(1);
+-
+- if (m_arg.is_scalar_type ()) { // m is scalar
+- double m = args(1).double_value ();
+-
+- if (! error_state) {
+-
+- if (u_arg.is_scalar_type ()) { /* u scalar */
+- /*{{{*/
+- if (u_arg.is_real_type ()) { // u real
+- double u = args(0).double_value ();
+-
+- if (! error_state) {
+- double sn, cn, dn;
+- double err=0;
+- octave_value result;
+-
+- sncndn(u, m, sn, cn, dn, err);
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3)
+- retval(3) = err;
+- } else
+- gripe_ellipj_arg ( "first");
+-
+- } else { // u complex
+- Complex u = u_arg.complex_value ();
+-
+- if (! error_state) {
+- Complex sn, cn, dn;
+- double err;
+- octave_value result;
+-
+- sncndn( u, m, sn, cn, dn, err);
+-
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3) retval(3) = err;
+- } else
+- gripe_ellipj_arg ( "second");
+- }
+- /*}}}*/
+- } else { /* u is matrix ( m is scalar ) */
+- /*{{{*/
+- ComplexMatrix u = u_arg.complex_matrix_value ();
+-
+- if (! error_state) {
+- octave_value result;
+- int nr = u.rows ();
+- int nc = u.cols ();
+-
+- ComplexMatrix sn (nr, nc), cn (nr, nc), dn (nr, nc);
+- Matrix err (nr, nc);
+-
+- for (int j = 0; j < nc; j++)
+- for (int i = 0; i < nr; i++)
+- sncndn (u(i,j), m, sn(i,j), cn(i,j), dn(i,j), err(i,j));
+-
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3) retval(3) = err;
+- } else
+- gripe_ellipj_arg ( "first");
+- /*}}}*/
+- }
+- } else
+- gripe_ellipj_arg ( "second");
+- } else { // m is matrix
+- Matrix m = args(1).matrix_value ();
+-
+- if (! error_state) {
+- int mr = m.rows ();
+- int mc = m.cols ();
+-
+- if (u_arg.is_scalar_type ()) { /* u is scalar */
+- /*{{{*/
+- octave_value result;
+- int nr = m.rows ();
+- int nc = m.cols ();
+- Matrix err (nr, nc);
+-
+- if (u_arg.is_real_type ()) {
+- double u = u_arg.double_value ();
+- Matrix sn (nr, nc), cn (nr, nc), dn (nr, nc);
+- if (! error_state) {
+- for (int j = 0; j < nc; j++)
+- for (int i = 0; i < nr; i++)
+- sncndn (u, m(i,j), sn(i,j), cn(i,j), dn(i,j), err(i,j));
+-
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3) retval(3) = err;
+- } else
+- gripe_ellipj_arg ( "first");
+- } else {
+- Complex u = u_arg.complex_value ();
+- ComplexMatrix sn (nr, nc), cn (nr, nc), dn (nr, nc);
+- if (! error_state) {
+- for (int j = 0; j < nc; j++)
+- for (int i = 0; i < nr; i++)
+- sncndn (u, m(i,j), sn(i,j), cn(i,j), dn(i,j), err(i,j));
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3) retval(3) = err;
+- } else
+- gripe_ellipj_arg ( "first");
+- }
+- /*}}}*/
+- } else { // u is matrix (m is matrix)
+- /*{{{*/
+- if (u_arg.is_real_type ()) { // u real matrix
+-
+- Matrix u = u_arg.matrix_value ();
+- if (! error_state) {
+- int ur = u.rows ();
+- int uc = u.cols ();
+-
+- if (mr == 1 && uc == 1) { // u column, m row
+- RowVector rm = m.row ((octave_idx_type)0);
+- ColumnVector cu = u.column ((octave_idx_type)0);
+-
+- Matrix sn (ur, mc), cn (ur, mc), dn (ur, mc);
+- Matrix err(ur,mc);
+-// octave_value result;
+-
+- for (int j = 0; j < mc; j++)
+- for (int i = 0; i < ur; i++)
+- sncndn (cu(i), rm(j), sn(i,j), cn(i,j), dn(i,j), err(i,j));
+-
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3) retval(3) = err;
+- } else if (ur == mr && uc == mc) {
+- Matrix sn (ur, mc), cn (ur, mc), dn (ur, mc);
+- Matrix err(ur,mc);
+-// octave_value result;
+-
+- for (int j = 0; j < uc; j++)
+- for (int i = 0; i < ur; i++)
+- sncndn (u(i,j), m(i,j), sn(i,j), cn(i,j), dn(i,j), err(i,j));
+-
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3) retval(3) = err;
+- } else
+- error("u m invalid");
+- } else
+- gripe_ellipj_arg ( "first ");
+- } else { // u complex matrix
+- ComplexMatrix u = u_arg.complex_matrix_value ();
+- if (! error_state) {
+- int ur = u.rows ();
+- int uc = u.cols ();
+-
+- if (mr == 1 && uc == 1) {
+- RowVector rm = m.row ((octave_idx_type)0);
+- ComplexColumnVector cu = u.column ((octave_idx_type)0);
+-
+- ComplexMatrix sn (ur, mc), cn (ur, mc), dn (ur, mc);
+- Matrix err(ur,mc);
+-// octave_value result;
+-
+- for (int j = 0; j < mc; j++)
+- for (int i = 0; i < ur; i++)
+- sncndn (cu(i), rm(j), sn(i,j), cn(i,j), dn(i,j), err(i,j));
+-
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3) retval(3) = err;
+- } else if (ur == mr && uc == mc) {
+-
+- ComplexMatrix sn (ur, mc), cn (ur, mc), dn (ur, mc);
+- Matrix err(ur,mc);
+-// octave_value result;
+-
+- for (int j = 0; j < uc; j++)
+- for (int i = 0; i < ur; i++)
+- sncndn (u(i,j), m(i,j), sn(i,j), cn(i,j), dn(i,j), err(i,j));
+-
+- retval (0) = sn;
+- retval (1) = cn;
+- retval (2) = dn;
+- if (nargout > 3) retval(3) = err;
+- } else
+- error("u m invalid");
+- } else
+- gripe_ellipj_arg ( "second");
+- }
+- /*}}}*/
+- }
+- } else
+- gripe_ellipj_arg ( "second");
+- } // m matrix
+- } else // wrong n. of argin
+- print_usage ();
+- return retval;
+-}
+-
+-/*
+-## demos taken from inst/ellipj.m
+-
+-%!demo
+-%! N = 150;
+-%! % m = [1-logspace(0,log(eps),N-1), 1]; ## m near 1
+-%! % m = [0, logspace(log(eps),0,N-1)]; ## m near 0
+-%! m = linspace(0,1,N); ## m equally spaced
+-%! u = linspace(-20,20,N);
+-%! M = ones(length(u),1) * m;
+-%! U = u' * ones(1, length(m));
+-%! [sn, cn, dn] = ellipj(U,M);
+-%!
+-%! %% Plotting
+-%! figure(2)
+-%! c = colormap(hot(64));
+-%! data = {sn,cn,dn};
+-%! dname = {"sn","cn","dn"};
+-%! for i=1:3
+-%! subplot(1,3,i);
+-%! image(m,u,32*clip(data{i},[-1,1])+32); # clip function belongs to audio package
+-%! title(dname{i});
+-%! end
+-%! colormap(c);
+-
+-%!demo
+-%! N = 200;
+-%! % m = [1-logspace(0,log(eps),N-1), 1]; ## m near 1
+-%! % m = [0, logspace(log(eps),0,N-1)]; ## m near 0
+-%! m = linspace(0,1,N); ## m equally spaced
+-%! u = linspace(0,20,5);
+-%! M = ones(length(u),1) * m;
+-%! U = u' * ones(1, length(m));
+-%! [sn, cn, dn] = ellipj(U,M);
+-%!
+-%! %% Plotting
+-%! data = {sn,cn,dn};
+-%! dname = {"sn","cn","dn"};
+-%! for i=1:3
+-%! subplot(1,3,i);
+-%! plot(m, data{i});
+-%! title(dname{i});
+-%! grid on;
+-%! end
+-*/
+-
+-/*
+-## tests taken from inst/test_sncndn.m
+-
+-%!test
+-%! k = (tan(pi/8.))^2; m = k*k;
+-%! SN = [
+-%! -1. + I * 0. , -0.8392965923 + 0. * I
+-%! -1. + I * 0.2 , -0.8559363407 + 0.108250955 * I
+-%! -1. + I * 0.4 , -0.906529758 + 0.2204040232 * I
+-%! -1. + I * 0.6 , -0.9931306727 + 0.3403783409 * I
+-%! -1. + I * 0.8 , -1.119268095 + 0.4720784944 * I
+-%! -1. + I * 1. , -1.29010951 + 0.6192468708 * I
+-%! -1. + I * 1.2 , -1.512691987 + 0.7850890595 * I
+-%! -1. + I * 1.4 , -1.796200374 + 0.9714821804 * I
+-%! -1. + I * 1.6 , -2.152201882 + 1.177446413 * I
+-%! -1. + I * 1.8 , -2.594547417 + 1.396378892 * I
+-%! -1. + I * 2. , -3.138145339 + 1.611394819 * I
+-%! -0.8 + I * 0. , -0.7158157937 + 0. * I
+-%! -0.8 + I * 0.2 , -0.7301746722 + 0.1394690862 * I
+-%! -0.8 + I * 0.4 , -0.7738940898 + 0.2841710966 * I
+-%! -0.8 + I * 0.6 , -0.8489542135 + 0.4394411376 * I
+-%! -0.8 + I * 0.8 , -0.9588386397 + 0.6107824358 * I
+-%! -0.8 + I * 1. , -1.108848724 + 0.8038415767 * I
+-%! -0.8 + I * 1.2 , -1.306629972 + 1.024193359 * I
+-%! -0.8 + I * 1.4 , -1.563010199 + 1.276740951 * I
+-%! -0.8 + I * 1.6 , -1.893274688 + 1.564345558 * I
+-%! -0.8 + I * 1.8 , -2.318944084 + 1.88491973 * I
+-%! -0.8 + I * 2. , -2.869716809 + 2.225506523 * I
+-%! -0.6 + I * 0. , -0.5638287208 + 0. * I
+-%! -0.6 + I * 0.2 , -0.5752723012 + 0.1654722474 * I
+-%! -0.6 + I * 0.4 , -0.610164314 + 0.3374004736 * I
+-%! -0.6 + I * 0.6 , -0.6702507087 + 0.5224614298 * I
+-%! -0.6 + I * 0.8 , -0.7586657365 + 0.7277663879 * I
+-%! -0.6 + I * 1. , -0.8803349115 + 0.9610513652 * I
+-%! -0.6 + I * 1.2 , -1.042696526 + 1.230800819 * I
+-%! -0.6 + I * 1.4 , -1.256964505 + 1.546195843 * I
+-%! -0.6 + I * 1.6 , -1.540333527 + 1.916612621 * I
+-%! -0.6 + I * 1.8 , -1.919816065 + 2.349972151 * I
+-%! -0.6 + I * 2. , -2.438761841 + 2.848129496 * I
+-%! -0.4 + I * 0. , -0.3891382858 + 0. * I
+-%! -0.4 + I * 0.2 , -0.3971152026 + 0.1850563793 * I
+-%! -0.4 + I * 0.4 , -0.4214662882 + 0.3775700801 * I
+-%! -0.4 + I * 0.6 , -0.4635087491 + 0.5853434119 * I
+-%! -0.4 + I * 0.8 , -0.5256432877 + 0.8168992398 * I
+-%! -0.4 + I * 1. , -0.611733177 + 1.081923504 * I
+-%! -0.4 + I * 1.2 , -0.7278102331 + 1.391822501 * I
+-%! -0.4 + I * 1.4 , -0.8833807998 + 1.760456461 * I
+-%! -0.4 + I * 1.6 , -1.093891878 + 2.205107766 * I
+-%! -0.4 + I * 1.8 , -1.385545188 + 2.747638761 * I
+-%! -0.4 + I * 2. , -1.805081271 + 3.41525351 * I
+-%! -0.2 + I * 0. , -0.1986311721 + 0. * I
+-%! -0.2 + I * 0.2 , -0.2027299916 + 0.1972398665 * I
+-%! -0.2 + I * 0.4 , -0.2152524522 + 0.402598347 * I
+-%! -0.2 + I * 0.6 , -0.2369100139 + 0.6246336356 * I
+-%! -0.2 + I * 0.8 , -0.2690115146 + 0.8728455227 * I
+-%! -0.2 + I * 1. , -0.3136938773 + 1.158323088 * I
+-%! -0.2 + I * 1.2 , -0.3743615191 + 1.494672508 * I
+-%! -0.2 + I * 1.4 , -0.4565255082 + 1.899466033 * I
+-%! -0.2 + I * 1.6 , -0.5694611346 + 2.39667232 * I
+-%! -0.2 + I * 1.8 , -0.7296612675 + 3.020990664 * I
+-%! -0.2 + I * 2. , -0.9685726188 + 3.826022536 * I
+-%! 0. + I * 0. , 0. + 0. * I
+-%! 0. + I * 0.2 , 0. + 0.201376364 * I
+-%! 0. + I * 0.4 , 0. + 0.4111029248 * I
+-%! 0. + I * 0.6 , 0. + 0.6380048435 * I
+-%! 0. + I * 0.8 , 0. + 0.8919321473 * I
+-%! 0. + I * 1. , 0. + 1.184486615 * I
+-%! 0. + I * 1.2 , 0. + 1.530096023 * I
+-%! 0. + I * 1.4 , 0. + 1.947754612 * I
+-%! 0. + I * 1.6 , 0. + 2.464074356 * I
+-%! 0. + I * 1.8 , 0. + 3.119049475 * I
+-%! 0. + I * 2. , 0. + 3.97786237 * I
+-%! 0.2 + I * 0. , 0.1986311721 + 0. * I
+-%! 0.2 + I * 0.2 , 0.2027299916 + 0.1972398665 * I
+-%! 0.2 + I * 0.4 , 0.2152524522 + 0.402598347 * I
+-%! 0.2 + I * 0.6 , 0.2369100139 + 0.6246336356 * I
+-%! 0.2 + I * 0.8 , 0.2690115146 + 0.8728455227 * I
+-%! 0.2 + I * 1. , 0.3136938773 + 1.158323088 * I
+-%! 0.2 + I * 1.2 , 0.3743615191 + 1.494672508 * I
+-%! 0.2 + I * 1.4 , 0.4565255082 + 1.899466033 * I
+-%! 0.2 + I * 1.6 , 0.5694611346 + 2.39667232 * I
+-%! 0.2 + I * 1.8 , 0.7296612675 + 3.020990664 * I
+-%! 0.2 + I * 2. , 0.9685726188 + 3.826022536 * I
+-%! 0.4 + I * 0. , 0.3891382858 + 0. * I
+-%! 0.4 + I * 0.2 , 0.3971152026 + 0.1850563793 * I
+-%! 0.4 + I * 0.4 , 0.4214662882 + 0.3775700801 * I
+-%! 0.4 + I * 0.6 , 0.4635087491 + 0.5853434119 * I
+-%! 0.4 + I * 0.8 , 0.5256432877 + 0.8168992398 * I
+-%! 0.4 + I * 1. , 0.611733177 + 1.081923504 * I
+-%! 0.4 + I * 1.2 , 0.7278102331 + 1.391822501 * I
+-%! 0.4 + I * 1.4 , 0.8833807998 + 1.760456461 * I
+-%! 0.4 + I * 1.6 , 1.093891878 + 2.205107766 * I
+-%! 0.4 + I * 1.8 , 1.385545188 + 2.747638761 * I
+-%! 0.4 + I * 2. , 1.805081271 + 3.41525351 * I
+-%! 0.6 + I * 0. , 0.5638287208 + 0. * I
+-%! 0.6 + I * 0.2 , 0.5752723012 + 0.1654722474 * I
+-%! 0.6 + I * 0.4 , 0.610164314 + 0.3374004736 * I
+-%! 0.6 + I * 0.6 , 0.6702507087 + 0.5224614298 * I
+-%! 0.6 + I * 0.8 , 0.7586657365 + 0.7277663879 * I
+-%! 0.6 + I * 1. , 0.8803349115 + 0.9610513652 * I
+-%! 0.6 + I * 1.2 , 1.042696526 + 1.230800819 * I
+-%! 0.6 + I * 1.4 , 1.256964505 + 1.546195843 * I
+-%! 0.6 + I * 1.6 , 1.540333527 + 1.916612621 * I
+-%! 0.6 + I * 1.8 , 1.919816065 + 2.349972151 * I
+-%! 0.6 + I * 2. , 2.438761841 + 2.848129496 * I
+-%! 0.8 + I * 0. , 0.7158157937 + 0. * I
+-%! 0.8 + I * 0.2 , 0.7301746722 + 0.1394690862 * I
+-%! 0.8 + I * 0.4 , 0.7738940898 + 0.2841710966 * I
+-%! 0.8 + I * 0.6 , 0.8489542135 + 0.4394411376 * I
+-%! 0.8 + I * 0.8 , 0.9588386397 + 0.6107824358 * I
+-%! 0.8 + I * 1. , 1.108848724 + 0.8038415767 * I
+-%! 0.8 + I * 1.2 , 1.306629972 + 1.024193359 * I
+-%! 0.8 + I * 1.4 , 1.563010199 + 1.276740951 * I
+-%! 0.8 + I * 1.6 , 1.893274688 + 1.564345558 * I
+-%! 0.8 + I * 1.8 , 2.318944084 + 1.88491973 * I
+-%! 0.8 + I * 2. , 2.869716809 + 2.225506523 * I
+-%! 1. + I * 0. , 0.8392965923 + 0. * I
+-%! 1. + I * 0.2 , 0.8559363407 + 0.108250955 * I
+-%! 1. + I * 0.4 , 0.906529758 + 0.2204040232 * I
+-%! 1. + I * 0.6 , 0.9931306727 + 0.3403783409 * I
+-%! 1. + I * 0.8 , 1.119268095 + 0.4720784944 * I
+-%! 1. + I * 1. , 1.29010951 + 0.6192468708 * I
+-%! 1. + I * 1.2 , 1.512691987 + 0.7850890595 * I
+-%! 1. + I * 1.4 , 1.796200374 + 0.9714821804 * I
+-%! 1. + I * 1.6 , 2.152201882 + 1.177446413 * I
+-%! 1. + I * 1.8 , 2.594547417 + 1.396378892 * I
+-%! 1. + I * 2. , 3.138145339 + 1.611394819 * I
+-%! ];
+-%! CN = [
+-%! -1. + I * 0. , 0.5436738271 + 0. * I
+-%! -1. + I * 0.2 , 0.5541219664 + 0.1672121517 * I
+-%! -1. + I * 0.4 , 0.5857703552 + 0.3410940893 * I
+-%! -1. + I * 0.6 , 0.6395034233 + 0.5285979063 * I
+-%! -1. + I * 0.8 , 0.716688504 + 0.7372552987 * I
+-%! -1. + I * 1. , 0.8189576795 + 0.9755037374 * I
+-%! -1. + I * 1.2 , 0.9477661951 + 1.253049471 * I
+-%! -1. + I * 1.4 , 1.103540657 + 1.581252712 * I
+-%! -1. + I * 1.6 , 1.284098214 + 1.973449038 * I
+-%! -1. + I * 1.8 , 1.481835651 + 2.4449211 * I
+-%! -1. + I * 2. , 1.679032464 + 3.011729224 * I
+-%! -0.8 + I * 0. , 0.6982891589 + 0. * I
+-%! -0.8 + I * 0.2 , 0.71187169 + 0.1430549855 * I
+-%! -0.8 + I * 0.4 , 0.7530744458 + 0.2920273465 * I
+-%! -0.8 + I * 0.6 , 0.8232501212 + 0.4531616768 * I
+-%! -0.8 + I * 0.8 , 0.9245978896 + 0.6334016187 * I
+-%! -0.8 + I * 1. , 1.060030206 + 0.8408616109 * I
+-%! -0.8 + I * 1.2 , 1.232861756 + 1.085475913 * I
+-%! -0.8 + I * 1.4 , 1.446126965 + 1.379933558 * I
+-%! -0.8 + I * 1.6 , 1.701139468 + 1.741030588 * I
+-%! -0.8 + I * 1.8 , 1.994526268 + 2.191509596 * I
+-%! -0.8 + I * 2. , 2.312257188 + 2.762051518 * I
+-%! -0.6 + I * 0. , 0.8258917445 + 0. * I
+-%! -0.6 + I * 0.2 , 0.842151698 + 0.1130337928 * I
+-%! -0.6 + I * 0.4 , 0.8915487431 + 0.2309124769 * I
+-%! -0.6 + I * 0.6 , 0.975948103 + 0.3588102098 * I
+-%! -0.6 + I * 0.8 , 1.098499209 + 0.5026234141 * I
+-%! -0.6 + I * 1. , 1.263676101 + 0.6695125973 * I
+-%! -0.6 + I * 1.2 , 1.477275851 + 0.8687285705 * I
+-%! -0.6 + I * 1.4 , 1.746262523 + 1.112955966 * I
+-%! -0.6 + I * 1.6 , 2.078179075 + 1.420581466 * I
+-%! -0.6 + I * 1.8 , 2.479425208 + 1.819580713 * I
+-%! -0.6 + I * 2. , 2.950586798 + 2.354077344 * I
+-%! -0.4 + I * 0. , 0.9211793498 + 0. * I
+-%! -0.4 + I * 0.2 , 0.9395019377 + 0.07822091534 * I
+-%! -0.4 + I * 0.4 , 0.9952345231 + 0.1598950363 * I
+-%! -0.4 + I * 0.6 , 1.090715991 + 0.2487465067 * I
+-%! -0.4 + I * 0.8 , 1.229998843 + 0.34910407 * I
+-%! -0.4 + I * 1. , 1.419103868 + 0.4663848201 * I
+-%! -0.4 + I * 1.2 , 1.666426377 + 0.607877235 * I
+-%! -0.4 + I * 1.4 , 1.983347336 + 0.7841054404 * I
+-%! -0.4 + I * 1.6 , 2.385101684 + 1.01134031 * I
+-%! -0.4 + I * 1.8 , 2.89185416 + 1.316448705 * I
+-%! -0.4 + I * 2. , 3.529393374 + 1.74670531 * I
+-%! -0.2 + I * 0. , 0.9800743122 + 0. * I
+-%! -0.2 + I * 0.2 , 0.9997019476 + 0.03999835809 * I
+-%! -0.2 + I * 0.4 , 1.059453907 + 0.08179712295 * I
+-%! -0.2 + I * 0.6 , 1.16200643 + 0.1273503824 * I
+-%! -0.2 + I * 0.8 , 1.312066413 + 0.1789585449 * I
+-%! -0.2 + I * 1. , 1.516804331 + 0.2395555269 * I
+-%! -0.2 + I * 1.2 , 1.786613221 + 0.313189147 * I
+-%! -0.2 + I * 1.4 , 2.136422971 + 0.405890925 * I
+-%! -0.2 + I * 1.6 , 2.588021972 + 0.527357091 * I
+-%! -0.2 + I * 1.8 , 3.174302819 + 0.6944201617 * I
+-%! -0.2 + I * 2. , 3.947361147 + 0.9387994989 * I
+-%! 0. + I * 0. , 1. + 0. * I
+-%! 0. + I * 0.2 , 1.020074723 + 0. * I
+-%! 0. + I * 0.4 , 1.08120563 + 0. * I
+-%! 0. + I * 0.6 , 1.18619146 + 0. * I
+-%! 0. + I * 0.8 , 1.339978715 + 0. * I
+-%! 0. + I * 1. , 1.550164037 + 0. * I
+-%! 0. + I * 1.2 , 1.827893279 + 0. * I
+-%! 0. + I * 1.4 , 2.189462954 + 0. * I
+-%! 0. + I * 1.6 , 2.659259752 + 0. * I
+-%! 0. + I * 1.8 , 3.275434266 + 0. * I
+-%! 0. + I * 2. , 4.101632484 + 0. * I
+-%! 0.2 + I * 0. , 0.9800743122 + 0. * I
+-%! 0.2 + I * 0.2 , 0.9997019476 - 0.03999835809 * I
+-%! 0.2 + I * 0.4 , 1.059453907 - 0.08179712295 * I
+-%! 0.2 + I * 0.6 , 1.16200643 - 0.1273503824 * I
+-%! 0.2 + I * 0.8 , 1.312066413 - 0.1789585449 * I
+-%! 0.2 + I * 1. , 1.516804331 - 0.2395555269 * I
+-%! 0.2 + I * 1.2 , 1.786613221 - 0.313189147 * I
+-%! 0.2 + I * 1.4 , 2.136422971 - 0.405890925 * I
+-%! 0.2 + I * 1.6 , 2.588021972 - 0.527357091 * I
+-%! 0.2 + I * 1.8 , 3.174302819 - 0.6944201617 * I
+-%! 0.2 + I * 2. , 3.947361147 - 0.9387994989 * I
+-%! 0.4 + I * 0. , 0.9211793498 + 0. * I
+-%! 0.4 + I * 0.2 , 0.9395019377 - 0.07822091534 * I
+-%! 0.4 + I * 0.4 , 0.9952345231 - 0.1598950363 * I
+-%! 0.4 + I * 0.6 , 1.090715991 - 0.2487465067 * I
+-%! 0.4 + I * 0.8 , 1.229998843 - 0.34910407 * I
+-%! 0.4 + I * 1. , 1.419103868 - 0.4663848201 * I
+-%! 0.4 + I * 1.2 , 1.666426377 - 0.607877235 * I
+-%! 0.4 + I * 1.4 , 1.983347336 - 0.7841054404 * I
+-%! 0.4 + I * 1.6 , 2.385101684 - 1.01134031 * I
+-%! 0.4 + I * 1.8 , 2.89185416 - 1.316448705 * I
+-%! 0.4 + I * 2. , 3.529393374 - 1.74670531 * I
+-%! 0.6 + I * 0. , 0.8258917445 + 0. * I
+-%! 0.6 + I * 0.2 , 0.842151698 - 0.1130337928 * I
+-%! 0.6 + I * 0.4 , 0.8915487431 - 0.2309124769 * I
+-%! 0.6 + I * 0.6 , 0.975948103 - 0.3588102098 * I
+-%! 0.6 + I * 0.8 , 1.098499209 - 0.5026234141 * I
+-%! 0.6 + I * 1. , 1.263676101 - 0.6695125973 * I
+-%! 0.6 + I * 1.2 , 1.477275851 - 0.8687285705 * I
+-%! 0.6 + I * 1.4 , 1.746262523 - 1.112955966 * I
+-%! 0.6 + I * 1.6 , 2.078179075 - 1.420581466 * I
+-%! 0.6 + I * 1.8 , 2.479425208 - 1.819580713 * I
+-%! 0.6 + I * 2. , 2.950586798 - 2.354077344 * I
+-%! 0.8 + I * 0. , 0.6982891589 + 0. * I
+-%! 0.8 + I * 0.2 , 0.71187169 - 0.1430549855 * I
+-%! 0.8 + I * 0.4 , 0.7530744458 - 0.2920273465 * I
+-%! 0.8 + I * 0.6 , 0.8232501212 - 0.4531616768 * I
+-%! 0.8 + I * 0.8 , 0.9245978896 - 0.6334016187 * I
+-%! 0.8 + I * 1. , 1.060030206 - 0.8408616109 * I
+-%! 0.8 + I * 1.2 , 1.232861756 - 1.085475913 * I
+-%! 0.8 + I * 1.4 , 1.446126965 - 1.379933558 * I
+-%! 0.8 + I * 1.6 , 1.701139468 - 1.741030588 * I
+-%! 0.8 + I * 1.8 , 1.994526268 - 2.191509596 * I
+-%! 0.8 + I * 2. , 2.312257188 - 2.762051518 * I
+-%! 1. + I * 0. , 0.5436738271 + 0. * I
+-%! 1. + I * 0.2 , 0.5541219664 - 0.1672121517 * I
+-%! 1. + I * 0.4 , 0.5857703552 - 0.3410940893 * I
+-%! 1. + I * 0.6 , 0.6395034233 - 0.5285979063 * I
+-%! 1. + I * 0.8 , 0.716688504 - 0.7372552987 * I
+-%! 1. + I * 1. , 0.8189576795 - 0.9755037374 * I
+-%! 1. + I * 1.2 , 0.9477661951 - 1.253049471 * I
+-%! 1. + I * 1.4 , 1.103540657 - 1.581252712 * I
+-%! 1. + I * 1.6 , 1.284098214 - 1.973449038 * I
+-%! 1. + I * 1.8 , 1.481835651 - 2.4449211 * I
+-%! 1. + I * 2. , 1.679032464 - 3.011729224 * I
+-%! ];
+-%! DN = [
+-%! -1. + I * 0. , 0.9895776106 + 0. * I
+-%! -1. + I * 0.2 , 0.9893361555 + 0.002756935338 * I
+-%! -1. + I * 0.4 , 0.9885716856 + 0.005949639805 * I
+-%! -1. + I * 0.6 , 0.9871564855 + 0.01008044183 * I
+-%! -1. + I * 0.8 , 0.9848512162 + 0.01579337596 * I
+-%! -1. + I * 1. , 0.9812582484 + 0.02396648455 * I
+-%! -1. + I * 1.2 , 0.9757399152 + 0.0358288294 * I
+-%! -1. + I * 1.4 , 0.9672786056 + 0.0531049859 * I
+-%! -1. + I * 1.6 , 0.954237868 + 0.0781744383 * I
+-%! -1. + I * 1.8 , 0.933957524 + 0.1141918269 * I
+-%! -1. + I * 2. , 0.9020917489 + 0.1650142936 * I
+-%! -0.8 + I * 0. , 0.992429635 + 0. * I
+-%! -0.8 + I * 0.2 , 0.9924147861 + 0.003020708044 * I
+-%! -0.8 + I * 0.4 , 0.99236555 + 0.00652359532 * I
+-%! -0.8 + I * 0.6 , 0.9922655715 + 0.0110676219 * I
+-%! -0.8 + I * 0.8 , 0.9920785856 + 0.01737733806 * I
+-%! -0.8 + I * 1. , 0.9917291795 + 0.02645738598 * I
+-%! -0.8 + I * 1.2 , 0.9910606387 + 0.03974949378 * I
+-%! -0.8 + I * 1.4 , 0.9897435004 + 0.05935252515 * I
+-%! -0.8 + I * 1.6 , 0.987077644 + 0.08832675281 * I
+-%! -0.8 + I * 1.8 , 0.9815667458 + 0.1310872821 * I
+-%! -0.8 + I * 2. , 0.970020127 + 0.1938136793 * I
+-%! -0.6 + I * 0. , 0.9953099088 + 0. * I
+-%! -0.6 + I * 0.2 , 0.995526009 + 0.002814772354 * I
+-%! -0.6 + I * 0.4 , 0.9962071136 + 0.006083312292 * I
+-%! -0.6 + I * 0.6 , 0.9974557125 + 0.01033463525 * I
+-%! -0.6 + I * 0.8 , 0.9994560563 + 0.01626207722 * I
+-%! -0.6 + I * 1. , 1.00249312 + 0.02484336286 * I
+-%! -0.6 + I * 1.2 , 1.006973922 + 0.0375167093 * I
+-%! -0.6 + I * 1.4 , 1.013436509 + 0.05645315628 * I
+-%! -0.6 + I * 1.6 , 1.022504295 + 0.08499262247 * I
+-%! -0.6 + I * 1.8 , 1.034670023 + 0.1283564595 * I
+-%! -0.6 + I * 2. , 1.049599899 + 0.194806122 * I
+-%! -0.4 + I * 0. , 0.9977686897 + 0. * I
+-%! -0.4 + I * 0.2 , 0.9981836165 + 0.002167241934 * I
+-%! -0.4 + I * 0.4 , 0.9994946045 + 0.004686808612 * I
+-%! -0.4 + I * 0.6 , 1.001910789 + 0.00797144174 * I
+-%! -0.4 + I * 0.8 , 1.005817375 + 0.01256717724 * I
+-%! -0.4 + I * 1. , 1.011836374 + 0.01925509038 * I
+-%! -0.4 + I * 1.2 , 1.020923572 + 0.02920828367 * I
+-%! -0.4 + I * 1.4 , 1.034513743 + 0.04425213602 * I
+-%! -0.4 + I * 1.6 , 1.054725746 + 0.06732276244 * I
+-%! -0.4 + I * 1.8 , 1.08462027 + 0.1033236812 * I
+-%! -0.4 + I * 2. , 1.128407402 + 0.1608240664 * I
+-%! -0.2 + I * 0. , 0.9994191176 + 0. * I
+-%! -0.2 + I * 0.2 , 0.9999683719 + 0.001177128019 * I
+-%! -0.2 + I * 0.4 , 1.001705496 + 0.00254669712 * I
+-%! -0.2 + I * 0.6 , 1.004913944 + 0.004334880912 * I
+-%! -0.2 + I * 0.8 , 1.010120575 + 0.006842775622 * I
+-%! -0.2 + I * 1. , 1.018189543 + 0.01050520136 * I
+-%! -0.2 + I * 1.2 , 1.030482479 + 0.01598431001 * I
+-%! -0.2 + I * 1.4 , 1.049126108 + 0.02433134655 * I
+-%! -0.2 + I * 1.6 , 1.077466003 + 0.0372877718 * I
+-%! -0.2 + I * 1.8 , 1.120863308 + 0.05789156398 * I
+-%! -0.2 + I * 2. , 1.188162088 + 0.09181238708 * I
+-%! 0. + I * 0. , 1. + 0. * I
+-%! 0. + I * 0.2 , 1.000596698 + 0. * I
+-%! 0. + I * 0.4 , 1.002484444 + 0. * I
+-%! 0. + I * 0.6 , 1.005973379 + 0. * I
+-%! 0. + I * 0.8 , 1.011641536 + 0. * I
+-%! 0. + I * 1. , 1.020441432 + 0. * I
+-%! 0. + I * 1.2 , 1.033885057 + 0. * I
+-%! 0. + I * 1.4 , 1.054361188 + 0. * I
+-%! 0. + I * 1.6 , 1.085694733 + 0. * I
+-%! 0. + I * 1.8 , 1.134186672 + 0. * I
+-%! 0. + I * 2. , 1.210701071 + 0. * I
+-%! 0.2 + I * 0. , 0.9994191176 + 0. * I
+-%! 0.2 + I * 0.2 , 0.9999683719 - 0.001177128019 * I
+-%! 0.2 + I * 0.4 , 1.001705496 - 0.00254669712 * I
+-%! 0.2 + I * 0.6 , 1.004913944 - 0.004334880912 * I
+-%! 0.2 + I * 0.8 , 1.010120575 - 0.006842775622 * I
+-%! 0.2 + I * 1. , 1.018189543 - 0.01050520136 * I
+-%! 0.2 + I * 1.2 , 1.030482479 - 0.01598431001 * I
+-%! 0.2 + I * 1.4 , 1.049126108 - 0.02433134655 * I
+-%! 0.2 + I * 1.6 , 1.077466003 - 0.0372877718 * I
+-%! 0.2 + I * 1.8 , 1.120863308 - 0.05789156398 * I
+-%! 0.2 + I * 2. , 1.188162088 - 0.09181238708 * I
+-%! 0.4 + I * 0. , 0.9977686897 + 0. * I
+-%! 0.4 + I * 0.2 , 0.9981836165 - 0.002167241934 * I
+-%! 0.4 + I * 0.4 , 0.9994946045 - 0.004686808612 * I
+-%! 0.4 + I * 0.6 , 1.001910789 - 0.00797144174 * I
+-%! 0.4 + I * 0.8 , 1.005817375 - 0.01256717724 * I
+-%! 0.4 + I * 1. , 1.011836374 - 0.01925509038 * I
+-%! 0.4 + I * 1.2 , 1.020923572 - 0.02920828367 * I
+-%! 0.4 + I * 1.4 , 1.034513743 - 0.04425213602 * I
+-%! 0.4 + I * 1.6 , 1.054725746 - 0.06732276244 * I
+-%! 0.4 + I * 1.8 , 1.08462027 - 0.1033236812 * I
+-%! 0.4 + I * 2. , 1.128407402 - 0.1608240664 * I
+-%! 0.6 + I * 0. , 0.9953099088 + 0. * I
+-%! 0.6 + I * 0.2 , 0.995526009 - 0.002814772354 * I
+-%! 0.6 + I * 0.4 , 0.9962071136 - 0.006083312292 * I
+-%! 0.6 + I * 0.6 , 0.9974557125 - 0.01033463525 * I
+-%! 0.6 + I * 0.8 , 0.9994560563 - 0.01626207722 * I
+-%! 0.6 + I * 1. , 1.00249312 - 0.02484336286 * I
+-%! 0.6 + I * 1.2 , 1.006973922 - 0.0375167093 * I
+-%! 0.6 + I * 1.4 , 1.013436509 - 0.05645315628 * I
+-%! 0.6 + I * 1.6 , 1.022504295 - 0.08499262247 * I
+-%! 0.6 + I * 1.8 , 1.034670023 - 0.1283564595 * I
+-%! 0.6 + I * 2. , 1.049599899 - 0.194806122 * I
+-%! 0.8 + I * 0. , 0.992429635 + 0. * I
+-%! 0.8 + I * 0.2 , 0.9924147861 - 0.003020708044 * I
+-%! 0.8 + I * 0.4 , 0.99236555 - 0.00652359532 * I
+-%! 0.8 + I * 0.6 , 0.9922655715 - 0.0110676219 * I
+-%! 0.8 + I * 0.8 , 0.9920785856 - 0.01737733806 * I
+-%! 0.8 + I * 1. , 0.9917291795 - 0.02645738598 * I
+-%! 0.8 + I * 1.2 , 0.9910606387 - 0.03974949378 * I
+-%! 0.8 + I * 1.4 , 0.9897435004 - 0.05935252515 * I
+-%! 0.8 + I * 1.6 , 0.987077644 - 0.08832675281 * I
+-%! 0.8 + I * 1.8 , 0.9815667458 - 0.1310872821 * I
+-%! 0.8 + I * 2. , 0.970020127 - 0.1938136793 * I
+-%! 1. + I * 0. , 0.9895776106 + 0. * I
+-%! 1. + I * 0.2 , 0.9893361555 - 0.002756935338 * I
+-%! 1. + I * 0.4 , 0.9885716856 - 0.005949639805 * I
+-%! 1. + I * 0.6 , 0.9871564855 - 0.01008044183 * I
+-%! 1. + I * 0.8 , 0.9848512162 - 0.01579337596 * I
+-%! 1. + I * 1. , 0.9812582484 - 0.02396648455 * I
+-%! 1. + I * 1.2 , 0.9757399152 - 0.0358288294 * I
+-%! 1. + I * 1.4 , 0.9672786056 - 0.0531049859 * I
+-%! 1. + I * 1.6 , 0.954237868 - 0.0781744383 * I
+-%! 1. + I * 1.8 , 0.933957524 - 0.1141918269 * I
+-%! 1. + I * 2. , 0.9020917489 - 0.1650142936 * I
+-%! ];
+-%! tol = 1e-9;
+-%! for x = 0:10
+-%! for y = 0:10
+-%! ur = -1 + x * 0.2;
+-%! ui = y * 0.2;
+-%! ii = 1 + y + x*11;
+-%! [sn, cn, dn] = ellipj (ur + I * ui, m);
+-%! assert (SN (ii, 2), sn, tol);
+-%! assert (CN (ii, 2), cn, tol);
+-%! assert (DN (ii, 2), dn, tol);
+-%! endfor
+-%! endfor
+-
+-## tests taken from test_ellipj.m
+-%!test
+-%! u1 = pi/3; m1 = 0;
+-%! res1 = [sin(pi/3), cos(pi/3), 1];
+-%! [sn,cn,dn]=ellipj(u1,m1);
+-%! assert([sn,cn,dn], res1, 10*eps);
+-
+-%!test
+-%! u2 = log(2); m2 = 1;
+-%! res2 = [ 3/5, 4/5, 4/5 ];
+-%! [sn,cn,dn]=ellipj(u2,m2);
+-%! assert([sn,cn,dn], res2, 10*eps);
+-
+-%!test
+-%! u3 = log(2)*1i; m3 = 0;
+-%! res3 = [3i/4,5/4,1];
+-%! [sn,cn,dn]=ellipj(u3,m3);
+-%! assert([sn,cn,dn], res3, 10*eps);
+-
+-%!test
+-%! u4 = -1; m4 = tan(pi/8)^4;
+-%! res4 = [-0.8392965923,0.5436738271,0.9895776106];
+-%! [sn,cn,dn]=ellipj(u4, m4);
+-%! assert([sn,cn,dn], res4, 1e-10);
+-
+-%!test
+-%! u5 = -0.2 + 0.4i; m5 = tan(pi/8)^4;
+-%! res5 = [ -0.2152524522 + 0.402598347i, ...
+-%! 1.059453907 + 0.08179712295i, ...
+-%! 1.001705496 + 0.00254669712i ];
+-%! [sn,cn,dn]=ellipj(u5,m5);
+-%! assert([sn,cn,dn], res5, 1e-9);
+-
+-%!test
+-%! u6 = 0.2 + 0.6i; m6 = tan(pi/8)^4;
+-%! res6 = [ 0.2369100139 + 0.624633635i, ...
+-%! 1.16200643 - 0.1273503824i, ...
+-%! 1.004913944 - 0.004334880912i ];
+-%! [sn,cn,dn]=ellipj(u6,m6);
+-%! assert([sn,cn,dn], res6, 1e-8);
+-
+-%!test
+-%! u7 = 0.8 + 0.8i; m7 = tan(pi/8)^4;
+-%! res7 = [0.9588386397 + 0.6107824358i, ...
+-%! 0.9245978896 - 0.6334016187i, ...
+-%! 0.9920785856 - 0.01737733806i ];
+-%! [sn,cn,dn]=ellipj(u7,m7);
+-%! assert([sn,cn,dn], res7, 1e-10);
+-
+-%!test
+-%! u=[0,pi/6,pi/4,pi/2]; m=0;
+-%! res = [0,1/2,1/sqrt(2),1;1,cos(pi/6),1/sqrt(2),0;1,1,1,1];
+-%! [sn,cn,dn]=ellipj(u,m);
+-%! assert([sn;cn;dn],res, 100*eps);
+-%! [sn,cn,dn]=ellipj(u',0);
+-%! assert([sn,cn,dn],res', 100*eps);
+-
+-## XXX FIXME XXX
+-## need to check [real,complex]x[scalar,rowvec,colvec,matrix]x[u,m]
+-
+-%!test
+-%! ## Test Jacobi elliptic functions
+-%! ## against "exact" solution from Mathematica 3.0
+-%! ## David Billinghurst
+-%! ## 1 February 2001
+-%! u = [ 0.25; 0.25; 0.20; 0.20; 0.672; 0.5];
+-%! m = [ 0.0; 1.0; 0.19; 0.81; 0.36; 0.9999999999];
+-%! S = [ sin(0.25); tanh(0.25);
+-%! 0.19842311013970879516;
+-%! 0.19762082367187648571;
+-%! 0.6095196917919021945;
+-%! 0.4621171572617320908 ];
+-%! C = [ cos(0.25); sech(0.25);
+-%! 0.9801164570409401062;
+-%! 0.9802785369736752032;
+-%! 0.7927709286533560550;
+-%! 0.8868188839691764094 ];
+-%! D = [ 1.0; sech(0.25);
+-%! 0.9962526643271134302;
+-%! 0.9840560289645665155;
+-%! 0.9307281387786906491;
+-%! 0.8868188839812167635 ];
+-%! [sn,cn,dn] = ellipj(u,m);
+-%! assert(sn,S,8*eps);
+-%! assert(cn,C,8*eps);
+-%! assert(dn,D,8*eps);
+-*/