- #1

- 9

- 0

## Main Question or Discussion Point

Hello

fortran users

I, have a problem regarding values that my program produces. Let me detailed it to you.

See, i have createrd a separate fortran program to calculete area under a given function i.e.

it perfroms integration. When this program runs independently it gives me area of the function say 20units for some limits. Now, if i use same programe in another big program which uses this as a subroutine and it calculate area of the same function between the same limits and gives area near about half (bit less or bit more) of the value it calculated independently, e.g. i can say it gives me area less than 10units.

One more thing is that, whole program is written in the Double Precession mode, and the function to be integrated contains sine and cosine function, i am using their double kind i.e. Dsin, Dcos etc.

Why i am getting this drastic change? mind it when i use it as a subroutine, i simply copy and paste it in bigger program and i do not put any extra dot to modify it?

How can copy and patse change the value ?

Plz. answer?

fortran users

I, have a problem regarding values that my program produces. Let me detailed it to you.

See, i have createrd a separate fortran program to calculete area under a given function i.e.

it perfroms integration. When this program runs independently it gives me area of the function say 20units for some limits. Now, if i use same programe in another big program which uses this as a subroutine and it calculate area of the same function between the same limits and gives area near about half (bit less or bit more) of the value it calculated independently, e.g. i can say it gives me area less than 10units.

One more thing is that, whole program is written in the Double Precession mode, and the function to be integrated contains sine and cosine function, i am using their double kind i.e. Dsin, Dcos etc.

Why i am getting this drastic change? mind it when i use it as a subroutine, i simply copy and paste it in bigger program and i do not put any extra dot to modify it?

How can copy and patse change the value ?

Plz. answer?