help-octave
[Top][All Lists]
Advanced

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

Re: Numerical Integration


From: Jaroslav Hajek
Subject: Re: Numerical Integration
Date: Sun, 7 Dec 2008 12:38:15 +0100

On Sun, Dec 7, 2008 at 11:50 AM, Søren Hauberg <address@hidden> wrote:
> søn, 07 12 2008 kl. 11:26 +0100, skrev Ivan Sutoris:
>> On Sat, Dec 6, 2008 at 8:42 PM, Marcin Ślęczka <address@hidden> wrote:
>> >
>> > Thanks a lot.
>> >
>> > What if the second functiont won't be an error function?
>>
>> I thought you could just call quad recursively, but apparently that is
>> not possible (it results in error). However, there is example for 2D
>> integration in Octave manual using quadl, which allows recursion:
>> http://www.gnu.org/software/octave/doc/interpreter/Functions-of-Multiple-Variables.html#Functions-of-Multiple-Variables
>>
>
> Yeah, 'quad' uses 'QUADPACK' which is a Fortran library for numerical
> integration. Apparently you cannot call Fortran routines recursively, so
> 'quad' inherits this limitation. I guess it would make sense to rewrite
> this code in C++ if anybody feel like helping out :-)
>

With more modern Fortran compilers, recursion is no problem (just
declaring the procedure RECURSIVE). A lot of problems with the Fortran
sources could go away if we resigned on compatibility with the ancient
f2c and g77.
The principal obstacle to doing so is that for building with MSVC on
Windows, no suitable Fortran 90 compiler is freely available. It
doesn't seem acceptable to require users that want to build themselves
with MSVC to also purchase Intel Visual Fortran or similar product (we
could get money together to buy our regular Windows builders a
license, so that binaries would still be available).
IMHO, there are at least 2 advantages to Fortran over C++:
1. Speed of array access due to aliasing problems of pointers. In C,
most of these can be solved using restricted pointers in C99, but in
C++ there are no restricted pointers so far.
2. Compiling Fortran in very fast compared to compiling C++. On any
system I tried, libcruft is usually compiled in a flash.



> Søren
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>



-- 
RNDr. Jaroslav Hajek
computing expert
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]