diff liboctave/lo-specfun.cc @ 4497:2a02f3a16fe0

[project @ 2003-09-04 18:48:13 by jwe]
author jwe
date Thu, 04 Sep 2003 18:48:13 +0000
parents 1aed172ab84a
children 3c82fc8f822c
line wrap: on
line diff
--- a/liboctave/lo-specfun.cc
+++ b/liboctave/lo-specfun.cc
@@ -153,7 +153,13 @@
 {
   double result;
   double sgngam;
+
+  if (x < 0)
+    (*current_liboctave_error_handler)
+      ("xlgamma: argument must be nonnegative");
+
   F77_FUNC (dlgams, DLGAMS) (x, result, sgngam);
+
   return result;
 }