summaryrefslogtreecommitdiffstats
path: root/mathfuncs_rcp.h
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-02-15 14:26:10 -0500
committerErik Schnetter <schnetter@gmail.com>2013-02-15 14:26:10 -0500
commit01ea146f550a48107b41d4d2aa149192f3b52142 (patch)
tree78b97a04e3b62f46320fefca1935605489716873 /mathfuncs_rcp.h
parent5240ff3139edade7894067b93d5630115e5293eb (diff)
downloadvecmathlib-01ea146f550a48107b41d4d2aa149192f3b52142.zip
vecmathlib-01ea146f550a48107b41d4d2aa149192f3b52142.tar.gz
Replace all assert() by VML_ASSERT()
Diffstat (limited to 'mathfuncs_rcp.h')
-rw-r--r--mathfuncs_rcp.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/mathfuncs_rcp.h b/mathfuncs_rcp.h
index 2b931c9..66196e3 100644
--- a/mathfuncs_rcp.h
+++ b/mathfuncs_rcp.h
@@ -5,7 +5,6 @@
#include "mathfuncs_base.h"
-#include <cassert>
#include <cmath>
@@ -20,7 +19,7 @@ namespace vecmathlib {
x = fabs(x);
// Initial guess
- assert(all(x > RV(0.0)));
+ VML_ASSERT(all(x > RV(0.0)));
intvec_t ilogb_x = ilogb(x);
// For stability, choose a starting value that is below the result
realvec_t r = scalbn(RV(0.5), -ilogb_x);
@@ -29,7 +28,7 @@ namespace vecmathlib {
int const nmax = 7;
for (int n=1; n<nmax; ++n) {
// Step
- assert(all(x > RV(0.0)));
+ VML_ASSERT(all(x > RV(0.0)));
// Newton method:
// Solve f(r) = 0 for f(r) = x - 1/r
// r <- r - f(r) / f'(r)
OpenPOWER on IntegriCloud