close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 20 years ago

Closed 18 years ago

Last modified 18 years ago

#222 closed defect (fixed)

About NIntegrate function...

Reported by: jnavarro Owned by: Jorge
Priority: normal Milestone:
Component: Kernel Version: 1.1.2
Severity: normal Keywords:
Cc:

Description

Hola a todos:

Remito una cuestion que me parece ya remiti hace tiempo, pero no recuerdo si
hubo alguna solucion o explicacion, o inetnto de solucion. Resulta que la funcion

Real NIntegrate (Code f, Real desde, Real hasta [,Real tolerancia])

parece tener un no adecuado funcionamiento cuando imponemos limites
xagerados.

Aqui paso un ejemplo:


Real FD(Real x){DensNormal(x)};
Real desde = -100.96;
Real hasta = 1000.96;

Real result = NIntegrate(FD, desde, hasta);


Cuando los limites son extremos, como es el caso que
expongo, pues en lugar de devolver 1, que es el area
bajo la curva de la funcion de densidad de
probabilidad normal, devuelve cero. Si utilizamos
limites simetricos, si devuelve la unidad
esperada, aunque sean enormes......Es que no debo usar NIntegrate para
estos casos?!?!?

Un saludo,

Julio Navarro Serrano

Change History (8)

comment:1 Changed 20 years ago by Jorge

Owner: changed from danirus to Jorge

comment:2 Changed 20 years ago by Jorge

Status: newassigned

Julio, recomendamos que uses IntegrateQAG que es similar a NIntegrate.
Dado que IntegrateQAG ofrece la misma funcionalidad, revisaremos este bug mas tarde.

comment:3 Changed 19 years ago by Jorge

Resolution: fixed
Status: assignedclosed

with the development code the sample provided gives the correct results.

comment:4 Changed 18 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: closedreopened

Now TOL crashes compiling this code.

comment:5 Changed 18 years ago by Jorge

tested on linux, release 1.1.4 the code output what is expected, will check on windows, also on trunk.

comment:6 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000222

Problem has been solved in CVS

Function NIntegrate is obsolete and will be eliminated from datgrav.cpp as built-in funcion.

For backward compatibility reasons NIntegrate is defined in initlibrary/math/_initmath.tol as an alias of IntegrateQAG that's working fine

This type of Code reference was not supported by OIS and it has been added this feature.

comment:7 Changed 18 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: reopenedclosed

comment:8 Changed 18 years ago by Víctor de Buen Remiro

blocked: 223
Note: See TracTickets for help on using tickets.