You are trying to compare double with operator==.
The calculations may differ, you need to use an epsilon value for a mistake margin:
const double Epsilon = 0.0001;
if (((s1+s2+s3) >= s4 - Epsilon) && ((s1+s2+s3) <= s4 + Epsilon))
{
}
3
solved Point and triangle