#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 r15586 = d;
        float r15587 = log(r15586);
        float r15588 = c;
        float r15589 = fabs(r15588);
        float r15590 = r15587 + r15589;
        float r15591 = tan(r15586);
        float r15592 = r15590 * r15591;
        return r15592;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15593 = d;
        double r15594 = log(r15593);
        double r15595 = c;
        double r15596 = fabs(r15595);
        double r15597 = r15594 + r15596;
        double r15598 = tan(r15593);
        double r15599 = r15597 * r15598;
        return r15599;
}


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

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

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 r15614, r15615, r15616, r15617, r15618, r15619, r15620;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15614);
        mpfr_init(r15615);
        mpfr_init(r15616);
        mpfr_init(r15617);
        mpfr_init(r15618);
        mpfr_init(r15619);
        mpfr_init(r15620);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15614, d, MPFR_RNDN);
        mpfr_log(r15615, r15614, MPFR_RNDN);
        mpfr_set_d(r15616, c, MPFR_RNDN);
        mpfr_abs(r15617, r15616, MPFR_RNDN);
        mpfr_add(r15618, r15615, r15617, MPFR_RNDN);
        mpfr_tan(r15619, r15614, MPFR_RNDN);
        mpfr_mul(r15620, r15618, r15619, MPFR_RNDN);
        return mpfr_get_d(r15620, MPFR_RNDN);
}

static mpfr_t r15621, r15622, r15623, r15624, r15625, r15626, r15627;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15621);
        mpfr_init(r15622);
        mpfr_init(r15623);
        mpfr_init(r15624);
        mpfr_init(r15625);
        mpfr_init(r15626);
        mpfr_init(r15627);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15621, d, MPFR_RNDN);
        mpfr_log(r15622, r15621, MPFR_RNDN);
        mpfr_set_d(r15623, c, MPFR_RNDN);
        mpfr_abs(r15624, r15623, MPFR_RNDN);
        mpfr_add(r15625, r15622, r15624, MPFR_RNDN);
        mpfr_tan(r15626, r15621, MPFR_RNDN);
        mpfr_mul(r15627, r15625, r15626, MPFR_RNDN);
        return mpfr_get_d(r15627, MPFR_RNDN);
}

static mpfr_t r15628, r15629, r15630, r15631, r15632, r15633, r15634;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15628);
        mpfr_init(r15629);
        mpfr_init(r15630);
        mpfr_init(r15631);
        mpfr_init(r15632);
        mpfr_init(r15633);
        mpfr_init(r15634);
}

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

