Go to the documentation of this file.
31 #include <casacore/casa/aips.h>
33 #include <casacore/casa/math.h>
34 #include <casacore/casa/stdlib.h>
37 #if defined (AIPS_SOLARIS) || defined(AIPS_IRIX)
151 {
if (point >= 0.0)
return Int (point);
else return Int(point - 1.0); }
153 {
if (point >= 0.0)
return Int(point);
else return Int(point - 1.0); }
196 inline Int sign(
Int val) {
return val<0 ? -1 : (val>0 ? 1:0);}
210 if (r != 0 && (x<0) != (y<0)) r+=y;
216 if (r != 0 && (x<0) != (y<0)) r+=y;
222 if (r != 0 && (x<0) != (y<0)) r+=y;
228 if (r != 0 && (x<0) != (y<0)) r+=y;
251 {
return near(val1, val2, tol); }
253 {
return near(val1, val2, tol); }
255 {
return near(val1, val2, tol); }
257 {
return near(val1, val2, tol); }
259 {
return near(val1, val2, tol); }
261 {
return near(val1, val2, tol); }
280 {
return nearAbs(val1, val2, tol); }
282 {
return nearAbs(val1, val2, tol); }
284 {
return nearAbs(val1, val2, tol); }
286 {
return nearAbs(val1, val2, tol); }
288 {
return nearAbs(val1, val2, tol); }
290 {
return nearAbs(val1, val2, tol); }
299 #if defined(AIPS_DARWIN)
300 return std::isfinite(val);
307 #if defined(AIPS_DARWIN)
308 return std::isfinite(val);
321 return (((*(
Int *)&(val) & 0x7f800000) == 0x7f800000) &&
322 ((*(
Int *)&(val) & 0x007fffff) != 0x00000000));
326 return ( std::isnan(val) );
uInt64 min(uInt64 a, uInt64 b)
Float floormod(Float x, Float y)
Double floormod(Double x, Double y)
Int64 floormod(Int64 x, Int64 y)
Bool allNearAbs(uInt val1, uInt val2, uInt tol=1)
The "allNearAbs" versions are aliases for the normal "nearAbs" versions.
uInt64 max(uInt64 a, uInt64 b)
Double max(Double a, Double b)
Double roundDouble(Double val, Double ndigit=2.5)
Round a number to ndigit significant digits, usually used for formatting for printing.
LatticeExprNode fmod(const LatticeExprNode &left, const LatticeExprNode &right)
Float floatInf()
Functions that return an IEEE Infinity, (positive infinity).
Bool allNear(Int val1, Int val2, Double tol=1.0e-5)
Bool near(Float val1, Double val2, Double tol=1.0e-5)
Float floatNaN()
Functions that return IEEE NaN's.
Bool isNaN(const Float &val)
Functions to test for IEEE NaN's.
Int square(Int val)
Return the square of a value.
LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
Bool nearAbs(Float val1, Double val2, Double tol=1.0e-5)
Double min(Double a, Double b)
Bool allNearAbs(Int val1, Int val2, Int tol=1)
Bool allNearAbs(Float val1, Float val2, Double tol=1.0e-5)
Bool allNear(uInt val1, uInt val2, Double tol=1.0e-5)
The "allNear" versions are aliases for the normal "near" versions.
Bool isFinite(const Double &val)
Float max(Float a, Float b)
Int cube(Int val)
Return the cube of a value.
Bool nearAbs(Double val1, Double val2, Double tol=1.0e-13)
Bool near(Int val1, Int val2, Double tol=1.0e-5)
Bool nearAbs(Float val1, Float val2, Double tol=1.0e-5)
Bool allNearAbs(Float val1, Double val2, Double tol=1.0e-5)
Int sign(Int val)
Return the sign of a value.
Float pow(Float f1, Double f2)
Returns f1**f2.
Bool nearAbs(Int val1, Int val2, Double tol=1.0e-5)
Int ifloor(Float point)
Return the integer "less than" point (i.e.
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)
Int floormod(Int x, Int y)
Return the floor modulo as used by Python (unlike C); divisor sign is used.
Float pow(Double f1, Float f2)
Bool near(uInt val1, uInt val2, Double tol=1.0e-5)
Functions to return whether a value is "relatively" near another.
Double square(Double val)
Double max(Double a, Float b)
this file contains all the compiler specific defines
Bool nearAbs(Double val1, Float val2, Double tol=1.0e-5)
Bool isFinite(const Float &val)
Functions to test if a floating point number is finite.
Bool isInf(Float val)
Functions to test for IEEE Infinity's.
Bool allNearAbs(Double val1, Float val2, Double tol=1.0e-5)
const Double e
e and functions thereof:
Bool allNear(Double val1, Double val2, Double tol=1.0e-13)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Bool allNear(Double val1, Float val2, Double tol=1.0e-5)
Bool allNear(Float val1, Float val2, Double tol=1.0e-5)
Int max(Int a, Int b)
Functions to get the max or min of two numbers.
Double min(Float a, Double b)
bool Bool
Define the standard types used by Casacore.
Bool near(Double val1, Double val2, Double tol=1.0e-13)
Bool nearAbs(uInt val1, uInt val2, Double tol=1.0e-5)
Functions to return whether a value is "absolutely" near another.
Bool allNear(Float val1, Double val2, Double tol=1.0e-5)
Double min(Double a, Float b)
Bool near(Double val1, Float val2, Double tol=1.0e-5)
Float min(Float a, Float b)
Bool near(Float val1, Float val2, Double tol=1.0e-5)
Double max(Float a, Double b)
unsigned long long uInt64
Bool allNearAbs(Double val1, Double val2, Double tol=1.0e-13)
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)