function [ n_data, a, b, c, z, fz ] = hyper_2f1_complex_values ( n_data )

%*****************************************************************************80
%
%% hyper_2f1_complex_values() returns some values of the hypergeometric 2F1 function.
%
%  Discussion:
%
%    In Mathematica, the function can be evaluated by:
%
%      fz = Hypergeometric2F1 [ a, b, c, z ]
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 December 2023
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Milton Abramowitz, Irene Stegun,
%    Handbook of Mathematical Functions,
%    National Bureau of Standards, 1964,
%    ISBN: 0-486-61272-4,
%    LC: QA47.A34.
%
%    Shanjie Zhang, Jianming Jin,
%    Computation of Special Functions,
%    Wiley, 1996,
%    ISBN: 0-471-11963-6,
%    LC: QA351.C45
%
%    Stephen Wolfram,
%    The Mathematica Book,
%    Fourth Edition,
%    Cambridge University Press, 1999,
%    ISBN: 0-521-64314-7,
%    LC: QA76.95.W65.
%
%    Daniel Zwillinger, editor,
%    CRC Standard Mathematical Tables and Formulae,
%    30th Edition,
%    CRC Press, 1996,
%    ISBN: 0-8493-2479-3,
%    LC: QA47.M315.
%
%  Input:
%
%    integer N_DATA.  The user sets N_DATA to 0 before the first call.  
%    Thereafter, it should simply be the value returned by the previous call.
%
%  Output:
%
%    integer N_DATA.  On each call, the routine increments N_DATA by 1, and
%    returns the corresponding data; when there is no more data, the
%    output value of N_DATA will be 0 again.
%
%    real A, B, C: the parameters.
%
%    complex Z: the argument.
%
%    complex FZ: the value of the function.
%
  n_max = 15;

  a_vec = [ ...
    3.2, ...
    3.2, ...
   -5.0, ...
    3.3, ...
   -7.0, ...
    4.3, ...
    3.3, ...
    3.5, ...
    3.3, ...
    7.0, ...
    5.0, ...
    3.5, ...
    2.1, ...
    8.7, ...
    8.7 ];

  b_vec = [ ...
   1.8, ...
  -1.8, ...
   3.3, ...
  -6.0, ...
   3.3, ...
  -8.0, ...
   5.8, ...
  -2.4, ...
   4.3, ...
   5.0, ...
   7.0, ...
   1.2, ...
   5.4, ...
   3.2, ...
   2.7 ];

  c_vec = [ ...
   6.7, ...
   6.7, ...
   6.7, ...
   3.7, ...
  -3.7, ...
  -3.7, ...
   6.7, ...
   6.7, ...
   6.7, ...
   4.1, ...
   4.1, ...
   9.7, ...
   9.7, ...
   6.7, ...
   6.7 ];

  fz_vec = [ ...
    5.468999154361234+0.00000000 * i, ...
    0.3375063477462785+0.00000000 * i, ...
    116.8274991533609+603.8909562709345 * i, ...
    17620.41819334182+38293.80901310932 * i, ...
   -11772775115.27448-14382285977.20268 * i, ...
    1316118577866.058-101298889382.4362 * i, ...
    1.733055678355656+0.6340102904953357 * i, ...
    0.6476224071999852-0.5211050690999773 * i, ...
   -1.483008322270093+8.374426179451589 * i, ...
   -0.004037609523971226-0.002956632645480181 * i, ...
   -0.004037609523971226-0.002956632645480181 * i, ...
    1.034313610729953+0.5447389238499308 * i, ...
    0.6885043978280027+1.227418679098749 * i, ...
   -0.9004649679297319-1.11988994714304 * i, ...
   -0.4608388640599718-0.5457569650549665 * i ];

  z_vec = [ ...
   1.0+0.0 * i, ...
   1.0+0.0 * i, ...
   5.2+4.8 * i, ...
   5.2-4.8 * i, ...
   5.2-4.8 * i, ...
   5.2+4.8 * i, ...
   0.2+0.1 * i, ...
   0.2+0.5 * i, ...
   0.8+0.3 * i, ...
   3.0-1.0 * i, ...
   3.0-1.0 * i, ...
   0.6+0.9 * i, ...
   0.5+0.7 * i, ...
   0.5+0.7 * i, ...
   0.6+0.9 * i ];

  if ( n_data < 0 )
    n_data = 0;
  end
 
  n_data = n_data + 1;

  if ( n_max < n_data )
    n_data = 0;
    a = 0.0;
    b = 0.0;
    c = 0.0;
    z = 0.0;
    fz = 0.0;
  else
    a = a_vec(n_data);
    b = b_vec(n_data);
    c = c_vec(n_data);
    z = z_vec(n_data);
    fz = fz_vec(n_data);
  end

  return
end
