Correct return types of isequal() and friends
Adjust numerical constants in kernel function implementations to their argument types

Introduce macro TYPED_CONST(TYPE, HALF_VAL, SINGLE_VAL, DOUBLE_VAL) that chooses the right constant depending on the type required. Use e.g. as acos(a)/TYPED_CONST(stype, M_PI_H, M_PI_F, M_PI).