comparison libinterp/corefcn/sparse-xpow.cc @ 31226:44cf6bbeeca9

sparse-xpow.cc: Change return type from int to bool for internal function
author Arun Giridhar <arungiridhar@gmail.com>
date Mon, 12 Sep 2022 05:35:48 -0400
parents 3eab70385569
children 0dec459a4064
comparison
equal deleted inserted replaced
31225:3eab70385569 31226:44cf6bbeeca9
45 #include "ov-cx-sparse.h" 45 #include "ov-cx-sparse.h"
46 #include "sparse-xpow.h" 46 #include "sparse-xpow.h"
47 47
48 OCTAVE_NAMESPACE_BEGIN 48 OCTAVE_NAMESPACE_BEGIN
49 49
50 static inline int 50 static inline bool
51 xisint (double x) 51 xisint (double x)
52 { 52 {
53 return (octave::math::x_nint (x) == x 53 return (octave::math::x_nint (x) == x
54 && ((x >= 0 && x < std::numeric_limits<int>::max ()) 54 && ((x >= 0 && x < std::numeric_limits<int>::max ())
55 || (x <= 0 && x > std::numeric_limits<int>::min ()))); 55 || (x <= 0 && x > std::numeric_limits<int>::min ())));