This code is syntactically incorrect. I simplified it a little and added the necessary braces at the end, although I don't know if this calculates the correct value (I haven't studied the wikipedia article).
float tempC = 25.7;
float temp = (tempC -32) * 5 / 9;
float RH = 35.9;
float dewpoint = (237.7*(17.271*temp)/(237.7*temp+log(RH/100))/(17.271-(17.271*temp)/(237.7*temp+(log(RH/100)))));
This at least compiles. I took out the recurring calculation of the temperature in Fahrenheit and made it before the dewpoint calculation.
For this formula, the result I get is 0.00.
I used this formula, but I can not confirm if the values are correct.
float aux = (log(RH / 100) + ((17.27 * temperatureC) / (237.3 + temperatureC))) / 17.27;
float dewpoint = (237.3 * aux) / (1 - aux);
The values that I'm getting are:
24.22 *C 75.59 *F 43.69 %RH 11.09 dew point *C 18.66 Humidex
Can you confirm if I'm right?
You may also want to try:
tempC = 25.7,
temp = (tempC - 32) * 5/9,
logRH = -1.024433, // ln(35.9/100)
a = 17.271,
b = 237.7,
y = a*temp/(b + temp) + logRH,
Td = b*y/(a - y);
In this calculation, it seems to me you were to ignore the value of the logarithm of %RH.
But I'm not sure.
thanks for your help,