[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: negative argument in ALOG bug in FEFF825 on CRAY PVP machines
Dear Feffers,
There WAS an occasional sign problem in padlib.f that only
revealed itself on the cray. The problem boiled down to
determining the sign of x (double precision) as an integer:
i = abs(x)/x
On all systems I've tried, this reliably gives -1 or 1, but
on the cray it occasionally gave 0. This is probably an issue
related to precision. I would definitely characterize it as a
compiler problem, though there's probably a cray engineer who
would not agree with that.
Anyway, padlib.f now does (essentially)
i = 1
if (x.le.0) i = -1
and later assigns any number with (abs(x).le.1.d-39) to 0.d0.
This appears to satisfy the cray.
--Matt Newville