Comaprison of double values
Hello every one,
Can somebody help me to write one macro to comapre two double values?
I need to have some thing like this
a <= b and a >= b, where a and b are two double values.
Thanks in advance.
[224 byte] By [
aram2k4] at [2007-11-20 1:14:56]

# 3 Re: Comaprison of double values
Please keep in mind that if your macro refers to a and/or b more than once and you use it with a function call (like sin(x)) or with an expression with a side-effect such as x++, the function will be called (up to) twice and in the second case the value of x may be incremented by 0, 1, or 2 depending on the value of x and the other parameter passed to the macro.
C++ inline functions do not have this problem. See also Inline Functions versus Macros (http://msdn2.microsoft.com/en-us/library/bf6bf4cf.aspx) in MSDN.