diff options
author | tradke <tradke@6a38eb6e-646e-4a02-a296-d141613ad6c4> | 2001-05-07 19:51:44 +0000 |
---|---|---|
committer | tradke <tradke@6a38eb6e-646e-4a02-a296-d141613ad6c4> | 2001-05-07 19:51:44 +0000 |
commit | fe9178e6c2487017141fd96a32d83eb93ff2310b (patch) | |
tree | 712cf7669bf6915729e78a7fc2dced221028603c | |
parent | dbdb2e1818a08bcde3236569b9e3bec7a4651df4 (diff) |
Fixed wrong argument types to pow(3) which caused the testsuite on DEC Alphas
(with native C compiler) to fail if the second argument to this function
was given as an integer.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@142 6a38eb6e-646e-4a02-a296-d141613ad6c4
-rw-r--r-- | src/RobinBoundary.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/RobinBoundary.c b/src/RobinBoundary.c index eb33fb8..0b09d49 100644 --- a/src/RobinBoundary.c +++ b/src/RobinBoundary.c @@ -447,13 +447,16 @@ void CCTK_FCALL CCTK_FNAME (BndRobinVN) int _i = CCTK_GFINDEX3D (GH, ii, jj, kk); \ cctk_type *_var = (cctk_type *) (GH->data[var][timelvl]) + _i; \ const CCTK_REAL *_r = radius + _i; \ + /* the native C compiler on DEC Alphas has problems with automatic \ + type-casting of integers to doubles for inlined math routines */ \ + const double dpow = (double) npow; \ \ \ _var[0] = (cctk_type) ( \ - ( 1 * pow (_r[3*offset], npow) * (_var[3*offset] - finf) \ - - 3 * pow (_r[2*offset], npow) * (_var[2*offset] - finf) \ - + 3 * pow (_r[1*offset], npow) * (_var[1*offset] - finf) \ - ) / pow (_r[0], npow) \ + ( 1 * pow (_r[3*offset], dpow) * (_var[3*offset] - finf) \ + - 3 * pow (_r[2*offset], dpow) * (_var[2*offset] - finf) \ + + 3 * pow (_r[1*offset], dpow) * (_var[1*offset] - finf) \ + ) / pow (_r[0], dpow) \ + finf); \ } \ } \ |