26 #if defined (HAVE_CONFIG_H)
35 DEFUN (__gammainc__, args, ,
41 if (args.length () != 2)
44 bool is_single = args(0).is_single_type () || args(1).is_single_type ();
47 int numel_x = args(0).numel ();
48 int numel_a = args(1).numel ();
65 x = args(0).float_array_value ();
68 a =
FloatNDArray (output_dv, args(1).float_scalar_value ());
70 a = args(1).float_array_value ();
74 static const float eps = std::numeric_limits<float>::epsilon();
75 float y, Cj, Dj, bj, aj, Deltaj;
95 while ((
std::abs ((Deltaj - 1) / y) >
eps) && (j < maxit))
98 Dj = 1 / (bj + aj*Dj);
118 x =
NDArray (output_dv, args(0).scalar_value ());
120 x = args(0).array_value ();
123 a =
NDArray (output_dv, args(1).scalar_value ());
125 a = args(1).array_value ();
128 static const double tiny =
math::exp2 (-100.0);
129 static const double eps = std::numeric_limits<double>::epsilon();
130 double y, Cj, Dj, bj, aj, Deltaj;
144 bj =
x(i) - a(i) + 1;
150 while ((
std::abs ((Deltaj - 1) / y) >
eps) && (j < maxit))
153 Dj = 1 / (bj + aj*Dj);
charNDArray max(char d, const charNDArray &m)
Vector representing the dimensions (size) of an Array.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
F77_RET_T const F77_DBLE * x
class OCTAVE_API FloatNDArray