Why is my result varying if I am performing division with a Global constant vs local variable? : I have been working on a C code. I have declared few constants using #define. However I have observed that while I am performing division of a local  variable with a constant(defined using #define) I am numerically getting a wrong answer. 

I have tried changing the constant defined(using #define) to a local variable and then performing division. Now I am getting correct answer.
The problem is I have many constants, whose values are to be used throughout various functions.  I want to know how I van solve this problem.

These are the results I am getting when used #define
"0.106883 is q2, 28.348689 is D2 ,1.508116 is q2/D2"


These are the results I am getting when used as a local variable.
"0.106883 is q2, 28.348689 is D2 ,0.003770 is q2/D2"


Any help is appreciated.I am using GCC 8.3.0_2.