PreviousIndexLast

[bug-gsl] Re: gsl_max and nested random variables (2008-06-10)

From: Brian Gough <bjg@gnu.org>
Subject: Re: gsl_max and nested random variables
Date: Tue, 10 Jun 2008 09:13:43 +0100
To: "K Okamoto" <okamotok@...........>
Cc: bug-gsl@gnu.org

At Mon, 9 Jun 2008 11:14:37 +0200,
K Okamoto wrote:
> I searched gsl_max in the bug archives to no avail so I am guessing
> this is the first time? In any event I found GSL_MAX to occasionally
> give the wrong answer. Here's the code:

I've added a note to the manual:

Note that the following macros perform multiple evaluations of their
arguments, so they should not be used with arguments that have side
effects (such as a call to a random number generator).

Thanks for your email.

--
Brian Gough

GNU Scientific Library -
http://www.gnu.org/software/gsl/