|
Have you tried putting "d0" after your numeric constants in FORTRAN,
i.e.
compare
easy = 5.11*5.234*4.987
vs.
easy = 5.11d0*5.234d0*4.987d0
Dave
>>> [EMAIL PROTECTED] 6/8/2006 4:22 PM >>> Hi,
I've added a very simply calculation to both the FORTRAN and Numeric calcs, and called it 'easy'. I've defined easy as --- easy = 5.11*5.234*4.987
the files are attached, and the output is below. The discrepancy always seems to show up at the 8th or 9th significant digit for simple multiplication, or for Numeric functions.
FORTRAN
M**p = 5.170837517496476E-002
easy = 133.381011962891 atan term = -1.01175767177248 PYTHON
M**p = 0.0517083688947
easy 133.38100538 atan term = -1.01175769857 Any diagnosis is greatly appreciated.
If anyone out there cares to run these 2 and verify the output on their machine, that would perhaps rule out/in the problem being my pc.
Buddy
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Wheeler Sent: Thursday, June 08, 2006 12:36 PM To: Multiple recipients of list Subject: Re: FiPy Precision compares FORTRAN with Numeric for some very simple array manipulation (as Dan Lewis suggested).
On Jun 8, 2006, at 10:48 AM, Damm, Edward F. (E. Buddy) wrote:
Daniel Wheeler |
- FiPy Precision Damm, Edward F. (E. Buddy)
- Re: FiPy Precision Daniel Wheeler
- RE: FiPy Precision Damm, Edward F. (E. Buddy)
- RE: FiPy Precision Chester J. Van Tyne
- RE: FiPy Precision E David Huckaby
