#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 r15607 = d;
        float r15608 = log(r15607);
        float r15609 = c;
        float r15610 = fabs(r15609);
        float r15611 = r15608 + r15610;
        float r15612 = tan(r15607);
        float r15613 = r15611 * r15612;
        return r15613;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15614 = d;
        double r15615 = log(r15614);
        double r15616 = c;
        double r15617 = fabs(r15616);
        double r15618 = r15615 + r15617;
        double r15619 = tan(r15614);
        double r15620 = r15618 * r15619;
        return r15620;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15621 = d;
        float r15622 = log(r15621);
        float r15623 = c;
        float r15624 = fabs(r15623);
        float r15625 = r15622 + r15624;
        float r15626 = tan(r15621);
        float r15627 = r15625 * r15626;
        return r15627;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15628 = d;
        double r15629 = log(r15628);
        double r15630 = c;
        double r15631 = fabs(r15630);
        double r15632 = r15629 + r15631;
        double r15633 = tan(r15628);
        double r15634 = r15632 * r15633;
        return r15634;
}

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 r15635, r15636, r15637, r15638, r15639, r15640, r15641;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15635);
        mpfr_init(r15636);
        mpfr_init(r15637);
        mpfr_init(r15638);
        mpfr_init(r15639);
        mpfr_init(r15640);
        mpfr_init(r15641);
}

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

static mpfr_t r15642, r15643, r15644, r15645, r15646, r15647, r15648;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15642);
        mpfr_init(r15643);
        mpfr_init(r15644);
        mpfr_init(r15645);
        mpfr_init(r15646);
        mpfr_init(r15647);
        mpfr_init(r15648);
}

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

static mpfr_t r15649, r15650, r15651, r15652, r15653, r15654, r15655;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15649);
        mpfr_init(r15650);
        mpfr_init(r15651);
        mpfr_init(r15652);
        mpfr_init(r15653);
        mpfr_init(r15654);
        mpfr_init(r15655);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15649, d, MPFR_RNDN);
        mpfr_log(r15650, r15649, MPFR_RNDN);
        mpfr_set_d(r15651, c, MPFR_RNDN);
        mpfr_abs(r15652, r15651, MPFR_RNDN);
        mpfr_add(r15653, r15650, r15652, MPFR_RNDN);
        mpfr_tan(r15654, r15649, MPFR_RNDN);
        mpfr_mul(r15655, r15653, r15654, MPFR_RNDN);
        return mpfr_get_d(r15655, MPFR_RNDN);
}

