C++ (Qt)double sn=log(s/n);
C++ (Qt)double n_=((n<=0)?1e-8:n);double sn_=s/n_;double sn__=((sn_<=0)?1e-8:sn_);double sn=log(sn__);
C++ (Qt)static const double epsilon = 0.000001; double sn = log((s + epsilon)/(n + epsilon));
C++ (Qt)double signal = GetSignal();double noise = GetNoise();if (Max(signal. noise) < fudge_Factor) result = 0; else { double ratio = Clamp(signal, signal_Min, signal_Max) / Clamp(noise. noise_Min, noise_Max); result = log(ratio);}
double sn_=s/n_;
C++ (Qt)if (sn != sn) throw;