#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 = %lf\n", q);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+Cgpkb3VibGUgY2FsY3VsYXRlX3EoZG91YmxlIHgpCnsKICAgIGRvdWJsZSBudW1lcmF0b3IgPSB0YW4oeCkgLSBsb2coc3FydChzaW4oeCkgLyAxMiArIGV4cCh4ICogeCAtIDUpKSk7CiAgICByZXR1cm4gbnVtZXJhdG9yOwp9CgppbnQgbWFpbih2b2lkKQp7CiAgICBkb3VibGUgeCA9IDA7CiAgICBkb3VibGUgcSA9IGNhbGN1bGF0ZV9xKHgpOwogICAgaWYgKGlzbmFuKHEpKSByZXR1cm4gMTsgLy/QntCx0YDQsNCx0L7RgtC60LAg0L7RiNC40LHQutC4INC40Lcg0YTRg9C90LrRhtC40LgKICAgIHByaW50ZigicSA9ICVsZlxuIiwgcSk7CiAgICByZXR1cm4gMDsKfQo=