#include <tgmath.h>
#include <gmp.h>
#include <mpfr.h>
#include <stdio.h>
#include <stdbool.h>

char *name = "(- (atan2 (atan2 a c) a) (log a))";

double f_if(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15375 = a;
        float r15376 = c;
        float r15377 = atan2(r15375, r15376);
        float r15378 = atan2(r15377, r15375);
        float r15379 = log(r15375);
        float r15380 = r15378 - r15379;
        return r15380;
}

double f_id(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15381 = a;
        double r15382 = c;
        double r15383 = atan2(r15381, r15382);
        double r15384 = atan2(r15383, r15381);
        double r15385 = log(r15381);
        double r15386 = r15384 - r15385;
        return r15386;
}


double f_of(float a, float __attribute__((unused)) b, float c, float __attribute__((unused)) d) {
        float r15387 = a;
        float r15388 = c;
        float r15389 = atan2(r15387, r15388);
        float r15390 = atan2(r15389, r15387);
        float r15391 = exp(r15390);
        float r15392 = r15391 / r15387;
        float r15393 = log(r15392);
        return r15393;
}

double f_od(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        double r15394 = a;
        double r15395 = c;
        double r15396 = atan2(r15394, r15395);
        double r15397 = atan2(r15396, r15394);
        double r15398 = exp(r15397);
        double r15399 = r15398 / r15394;
        double r15400 = log(r15399);
        return r15400;
}

void mpfr_fmod2(mpfr_t r, mpfr_t n, mpfr_t d, mpfr_rnd_t rmd) {
        mpfr_fmod(r, n, d, rmd);
        if (mpfr_cmp_ui(r, 0) < 0) mpfr_add(r, r, d, rmd);
}


static mpfr_t r15401, r15402, r15403, r15404, r15405, r15406;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15401);
        mpfr_init(r15402);
        mpfr_init(r15403);
        mpfr_init(r15404);
        mpfr_init(r15405);
        mpfr_init(r15406);
}

double f_im(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15401, a, MPFR_RNDN);
        mpfr_set_d(r15402, c, MPFR_RNDN);
        mpfr_atan2(r15403, r15401, r15402, MPFR_RNDN);
        mpfr_atan2(r15404, r15403, r15401, MPFR_RNDN);
        mpfr_log(r15405, r15401, MPFR_RNDN);
        mpfr_sub(r15406, r15404, r15405, MPFR_RNDN);
        return mpfr_get_d(r15406, MPFR_RNDN);
}

static mpfr_t r15407, r15408, r15409, r15410, r15411, r15412, r15413;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15407);
        mpfr_init(r15408);
        mpfr_init(r15409);
        mpfr_init(r15410);
        mpfr_init(r15411);
        mpfr_init(r15412);
        mpfr_init(r15413);
}

double f_fm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15407, a, MPFR_RNDN);
        mpfr_set_d(r15408, c, MPFR_RNDN);
        mpfr_atan2(r15409, r15407, r15408, MPFR_RNDN);
        mpfr_atan2(r15410, r15409, r15407, MPFR_RNDN);
        mpfr_exp(r15411, r15410, MPFR_RNDN);
        mpfr_div(r15412, r15411, r15407, MPFR_RNDN);
        mpfr_log(r15413, r15412, MPFR_RNDN);
        return mpfr_get_d(r15413, MPFR_RNDN);
}

static mpfr_t r15414, r15415, r15416, r15417, r15418, r15419, r15420;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15414);
        mpfr_init(r15415);
        mpfr_init(r15416);
        mpfr_init(r15417);
        mpfr_init(r15418);
        mpfr_init(r15419);
        mpfr_init(r15420);
}

double f_dm(double a, double __attribute__((unused)) b, double c, double __attribute__((unused)) d) {
        mpfr_set_d(r15414, a, MPFR_RNDN);
        mpfr_set_d(r15415, c, MPFR_RNDN);
        mpfr_atan2(r15416, r15414, r15415, MPFR_RNDN);
        mpfr_atan2(r15417, r15416, r15414, MPFR_RNDN);
        mpfr_exp(r15418, r15417, MPFR_RNDN);
        mpfr_div(r15419, r15418, r15414, MPFR_RNDN);
        mpfr_log(r15420, r15419, MPFR_RNDN);
        return mpfr_get_d(r15420, MPFR_RNDN);
}

