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)
307 #if defined(AIPS_DARWIN)
321 return (((*(
Int *)&(val) & 0x7f800000) == 0x7f800000) &&
322 ((*(
Int *)&(val) & 0x007fffff) != 0x00000000));
bool isfinite(const std::complex< T > &val)
bool isnan(const std::complex< T > &val)
this file contains all the compiler specific defines
LatticeExprNode fmod(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
bool Bool
Define the standard types used by Casacore.
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)
unsigned long long uInt64
Bool nearAbs(Float val1, Double val2, Double tol=1.0e-5)
Float pow(Double f1, Float f2)
Bool nearAbs(uInt val1, uInt val2, Double tol=1.0e-5)
Functions to return whether a value is "absolutely" near another.
Bool nearAbs(Int val1, Int val2, Double tol=1.0e-5)
Bool nearAbs(Float val1, Float val2, Double tol=1.0e-5)
Bool nearAbs(Double val1, Double val2, Double tol=1.0e-13)
Float floatNaN()
Functions that return IEEE NaN's.
Bool allNear(Float val1, Float val2, Double tol=1.0e-5)
Bool allNearAbs(Double val1, Float val2, Double tol=1.0e-5)
Bool near(Double val1, Double val2, Double tol=1.0e-13)
Int cube(Int val)
Return the cube of a value.
Int max(Int a, Int b)
Functions to get the max or min of two numbers.
Bool isFinite(const Float &val)
Functions to test if a floating point number is finite.
Bool allNear(uInt val1, uInt val2, Double tol=1.0e-5)
The "allNear" versions are aliases for the normal "near" versions.
Double min(Float a, Double b)
Float floormod(Float x, Float y)
Int ifloor(Float point)
Return the integer "less than" point (i.e.
Bool near(Int val1, Int val2, Double tol=1.0e-5)
Float min(Float a, Float b)
Bool allNear(Double val1, Float val2, Double tol=1.0e-5)
Bool near(Float val1, Double val2, Double tol=1.0e-5)
Double min(Double a, Double b)
uInt64 max(uInt64 a, uInt64 b)
Double square(Double val)
Bool near(Float val1, Float val2, Double tol=1.0e-5)
Bool allNearAbs(uInt val1, uInt val2, uInt tol=1)
The "allNearAbs" versions are aliases for the normal "nearAbs" versions.
Bool allNear(Int val1, Int val2, Double tol=1.0e-5)
Bool allNearAbs(Float val1, Float val2, Double tol=1.0e-5)
Bool allNearAbs(Double val1, Double val2, Double tol=1.0e-13)
Double max(Float a, Double b)
Float floatInf()
Functions that return an IEEE Infinity, (positive infinity).
Float max(Float a, Float b)
Bool near(Double val1, Float val2, Double tol=1.0e-5)
Double min(Double a, Float b)
Bool isFinite(const Double &val)
Bool isNaN(const Float &val)
Functions to test for IEEE NaN's.
Bool allNear(Float val1, Double val2, Double tol=1.0e-5)
Double max(Double a, Float b)
Bool near(uInt val1, uInt val2, Double tol=1.0e-5)
Functions to return whether a value is "relatively" near another.
Double floormod(Double x, Double y)
Int floormod(Int x, Int y)
Return the floor modulo as used by Python (unlike C); divisor sign is used.
Double max(Double a, Double b)
Float pow(Float f1, Double f2)
Returns f1**f2.
uInt64 min(uInt64 a, uInt64 b)
Bool nearAbs(Double val1, Float val2, Double tol=1.0e-5)
Int64 floormod(Int64 x, Int64 y)
Int square(Int val)
Return the square of a value.
Bool allNearAbs(Int val1, Int val2, Int tol=1)
Bool allNear(Double val1, Double val2, Double tol=1.0e-13)
Bool isInf(Float val)
Functions to test for IEEE Infinity's.
Bool allNearAbs(Float val1, Double val2, Double tol=1.0e-5)
Int sign(Int val)
Return the sign of a value.
Double roundDouble(Double val, Double ndigit=2.5)
Round a number to ndigit significant digits, usually used for formatting for printing.