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

char *name = "(* (+ (log d) (fabs c)) (tan d))";

double f_if(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15598 = d;
        float r15599 = log(r15598);
        float r15600 = c;
        float r15601 = fabs(r15600);
        float r15602 = r15599 + r15601;
        float r15603 = tan(r15598);
        float r15604 = r15602 * r15603;
        return r15604;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15605 = d;
        double r15606 = log(r15605);
        double r15607 = c;
        double r15608 = fabs(r15607);
        double r15609 = r15606 + r15608;
        double r15610 = tan(r15605);
        double r15611 = r15609 * r15610;
        return r15611;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15612 = d;
        float r15613 = log(r15612);
        float r15614 = c;
        float r15615 = fabs(r15614);
        float r15616 = r15613 + r15615;
        float r15617 = tan(r15612);
        float r15618 = r15616 * r15617;
        return r15618;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15619 = d;
        double r15620 = log(r15619);
        double r15621 = c;
        double r15622 = fabs(r15621);
        double r15623 = r15620 + r15622;
        double r15624 = tan(r15619);
        double r15625 = r15623 * r15624;
        return r15625;
}

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 r15626, r15627, r15628, r15629, r15630, r15631, r15632;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15626);
        mpfr_init(r15627);
        mpfr_init(r15628);
        mpfr_init(r15629);
        mpfr_init(r15630);
        mpfr_init(r15631);
        mpfr_init(r15632);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15626, d, MPFR_RNDN);
        mpfr_log(r15627, r15626, MPFR_RNDN);
        mpfr_set_d(r15628, c, MPFR_RNDN);
        mpfr_abs(r15629, r15628, MPFR_RNDN);
        mpfr_add(r15630, r15627, r15629, MPFR_RNDN);
        mpfr_tan(r15631, r15626, MPFR_RNDN);
        mpfr_mul(r15632, r15630, r15631, MPFR_RNDN);
        return mpfr_get_d(r15632, MPFR_RNDN);
}

static mpfr_t r15633, r15634, r15635, r15636, r15637, r15638, r15639;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15633);
        mpfr_init(r15634);
        mpfr_init(r15635);
        mpfr_init(r15636);
        mpfr_init(r15637);
        mpfr_init(r15638);
        mpfr_init(r15639);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15633, d, MPFR_RNDN);
        mpfr_log(r15634, r15633, MPFR_RNDN);
        mpfr_set_d(r15635, c, MPFR_RNDN);
        mpfr_abs(r15636, r15635, MPFR_RNDN);
        mpfr_add(r15637, r15634, r15636, MPFR_RNDN);
        mpfr_tan(r15638, r15633, MPFR_RNDN);
        mpfr_mul(r15639, r15637, r15638, MPFR_RNDN);
        return mpfr_get_d(r15639, MPFR_RNDN);
}

static mpfr_t r15640, r15641, r15642, r15643, r15644, r15645, r15646;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15640);
        mpfr_init(r15641);
        mpfr_init(r15642);
        mpfr_init(r15643);
        mpfr_init(r15644);
        mpfr_init(r15645);
        mpfr_init(r15646);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15640, d, MPFR_RNDN);
        mpfr_log(r15641, r15640, MPFR_RNDN);
        mpfr_set_d(r15642, c, MPFR_RNDN);
        mpfr_abs(r15643, r15642, MPFR_RNDN);
        mpfr_add(r15644, r15641, r15643, MPFR_RNDN);
        mpfr_tan(r15645, r15640, MPFR_RNDN);
        mpfr_mul(r15646, r15644, r15645, MPFR_RNDN);
        return mpfr_get_d(r15646, MPFR_RNDN);
}

