#include <stdio.h>
#include <math.h>
double calculate_q(double x)
{
double numerator = tan(x) - log(sqrt(sin((x) / 12) + exp(x * x - 5)));
return numerator;
}
int main(void)
{
double x = 0;
double q = calculate_q(x);
if (isnan(q)) return 1; //Обработка ошибки из функции
printf("q = %f\n", q);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+Cgpkb3VibGUgY2FsY3VsYXRlX3EoZG91YmxlIHgpCnsKICAgIGRvdWJsZSBudW1lcmF0b3IgPSB0YW4oeCkgLSBsb2coc3FydChzaW4oKHgpIC8gMTIpICsgZXhwKHggKiB4IC0gNSkpKTsKICAgIHJldHVybiBudW1lcmF0b3I7Cn0KCmludCBtYWluKHZvaWQpCnsKICAgIGRvdWJsZSB4ID0gMDsKICAgIGRvdWJsZSBxID0gY2FsY3VsYXRlX3EoeCk7CiAgICBpZiAoaXNuYW4ocSkpIHJldHVybiAxOyAvL9Ce0LHRgNCw0LHQvtGC0LrQsCDQvtGI0LjQsdC60Lgg0LjQtyDRhNGD0L3QutGG0LjQuAogICAgcHJpbnRmKCJxID0gJWZcbiIsIHEpOwogICAgcmV0dXJuIDA7Cn0K