octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Oct-file version of the cquad integrator


From: Jaroslav Hajek
Subject: Re: Oct-file version of the cquad integrator
Date: Tue, 27 Apr 2010 15:29:00 +0200

On Tue, Apr 27, 2010 at 2:01 PM, Pedro Gonnet <address@hidden> wrote:
>
> Small bug in the handling of string arguments fixed, e.g. it doesn't
> handle functions passed as strings, just handles the error correctly
> now.
>
> Cheers, Pedro.
>


Nice job. I'm on vacation now, but I had a quick look anyway. I have
several suggestions:

1. don't use std::isnan, std::isinf, std::isfinite. These are not
standard C++, so we shouldn't rely on them being available. Instead,
Octave provides xisnan, xisinf, xfinite. These will map onto the std::
functions if they are available, so they incur no performance penalty,
otherwise they will be emulated. When Octave switches to C++0x
standard, we'll probably replace the x-versions.

2. *don't* use alloca, it's non-standard and often buggy. Use
OCTAVE_LOCAL_BUFFER instead.

3. Extracting function pointer through function_value works, but it
has the drawback that overloads for a named handle are ignored. An
alternative is to call directly the octave_value::do_multi_index_op
method.

I'll probably address these points later unless you do it first. In
any case, thanks for this contribution.

regards

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]