For example,
float a = 1.0;
float b = 1.2;
puts(a == b? "equal": "not equal");
Does compiler deal with it bitwisely or by some other methods?
(I know it's not a good choice to decide the equality of floating-point numbers by "==", I just want to know how a compiler deals with this situation.)
The general, full answer is that floating-point numbers are compared according to the IEEE 754 specification.
To answer your question specifically, most of the time two floating-point numbers are compared bitwise, with a few exceptional cases: