From 86f88acbd2acc8394d12faa466b91cf5220a34c9 Mon Sep 17 00:00:00 2001 From: Folkert Nobels <nobels@strw.leidenuniv.nl> Date: Mon, 26 Nov 2018 15:02:25 +0100 Subject: [PATCH] Change pow(x,3) to x*x*x --- src/potential/hernquist/potential.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/potential/hernquist/potential.h b/src/potential/hernquist/potential.h index 154b843623..19477974e2 100644 --- a/src/potential/hernquist/potential.h +++ b/src/potential/hernquist/potential.h @@ -233,12 +233,12 @@ static INLINE void potential_init_backend( } else if (V200 != 0.0) { /* Calculate M200 and R200 from V200 */ - M200 = pow(V200, 3) / (10. * G_newton * H0); + M200 = V200*V200*V200 / (10. * G_newton * H0); R200 = V200 / (10 * H0); } else if (R200 != 0.0) { /* Calculate M200 and V200 from R200 */ V200 = 10. * H0 * R200; - M200 = pow(V200, 3) / (10. * G_newton * H0); + M200 = V200*V200*V200 / (10. * G_newton * H0); } else { error("Please specify one of the 3 variables M200, V200 or R200"); } -- GitLab