From 887e60df243ce6bd7b0d2e09b06a0dd8500ddc81 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sun, 29 Mar 2015 16:46:56 +0200 Subject: Use fabs() instead of abs() Noted by David F. Crouse. Signed-off-by: Dominik Brodowski --- DOCUMENTATION | 6 ++++++ nrlmsise-00.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/DOCUMENTATION b/DOCUMENTATION index 0e55075..c390d1c 100644 --- a/DOCUMENTATION +++ b/DOCUMENTATION @@ -133,6 +133,12 @@ the in- and output, and the differences between the various functions. 20100516 - bugfix concernin Argon densities (Dr. Choliy Vasyl) +20131225 - fix comment on switch 0, silence compiler warnings + (David F. Crouse) + +20150329 - use fabs() instead of abs() + (David F. Crouse) + 7. TESTING OUTPUT ================= diff --git a/nrlmsise-00.c b/nrlmsise-00.c index 83ea162..c5e22e0 100644 --- a/nrlmsise-00.c +++ b/nrlmsise-00.c @@ -807,7 +807,7 @@ double globe7(double *p, struct nrlmsise_input *input, struct nrlmsise_flags *fl /* parms not used: 82, 89, 99, 139-149 */ tinf = p[30]; for (i=0;i<14;i++) - tinf = tinf + abs(flags->sw[i+1])*t[i]; + tinf = tinf + fabs(flags->sw[i+1])*t[i]; return tinf; } @@ -903,7 +903,7 @@ double glob7s(double *p, struct nrlmsise_input *input, struct nrlmsise_flags *fl } tt=0; for (i=0;i<14;i++) - tt+=abs(flags->sw[i+1])*t[i]; + tt+=fabs(flags->sw[i+1])*t[i]; return tt; } -- cgit v1.2.3