This is ridiculous. Your calculator (most calculators) cannot apply sin to π, because π is not representable is their system (typically base-2 or base-10 floating-point).
What you have done here is make sine worse for all values, including the representable value closest to π, in order to obtain what you think is a cosmetically satisfying result for the latter. Note that seeing the closest representable value to π does not mean that the user intended π. Perhaps the user obtained this value as the result of a computation and it's a coincidence. Or perhaps the user really wants to know what the sine of 0x1.921fb54442d18p+1 (the double closest to π) is. Hint: it is not zero.