#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 r15683 = d;
        float r15684 = log(r15683);
        float r15685 = c;
        float r15686 = fabs(r15685);
        float r15687 = r15684 + r15686;
        float r15688 = tan(r15683);
        float r15689 = r15687 * r15688;
        return r15689;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15690 = d;
        double r15691 = log(r15690);
        double r15692 = c;
        double r15693 = fabs(r15692);
        double r15694 = r15691 + r15693;
        double r15695 = tan(r15690);
        double r15696 = r15694 * r15695;
        return r15696;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15697 = d;
        float r15698 = log(r15697);
        float r15699 = c;
        float r15700 = fabs(r15699);
        float r15701 = r15698 + r15700;
        float r15702 = tan(r15697);
        float r15703 = r15701 * r15702;
        return r15703;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15704 = d;
        double r15705 = log(r15704);
        double r15706 = c;
        double r15707 = fabs(r15706);
        double r15708 = r15705 + r15707;
        double r15709 = tan(r15704);
        double r15710 = r15708 * r15709;
        return r15710;
}

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 r15711, r15712, r15713, r15714, r15715, r15716, r15717;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15711);
        mpfr_init(r15712);
        mpfr_init(r15713);
        mpfr_init(r15714);
        mpfr_init(r15715);
        mpfr_init(r15716);
        mpfr_init(r15717);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15711, d, MPFR_RNDN);
        mpfr_log(r15712, r15711, MPFR_RNDN);
        mpfr_set_d(r15713, c, MPFR_RNDN);
        mpfr_abs(r15714, r15713, MPFR_RNDN);
        mpfr_add(r15715, r15712, r15714, MPFR_RNDN);
        mpfr_tan(r15716, r15711, MPFR_RNDN);
        mpfr_mul(r15717, r15715, r15716, MPFR_RNDN);
        return mpfr_get_d(r15717, MPFR_RNDN);
}

static mpfr_t r15718, r15719, r15720, r15721, r15722, r15723, r15724;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15718);
        mpfr_init(r15719);
        mpfr_init(r15720);
        mpfr_init(r15721);
        mpfr_init(r15722);
        mpfr_init(r15723);
        mpfr_init(r15724);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15718, d, MPFR_RNDN);
        mpfr_log(r15719, r15718, MPFR_RNDN);
        mpfr_set_d(r15720, c, MPFR_RNDN);
        mpfr_abs(r15721, r15720, MPFR_RNDN);
        mpfr_add(r15722, r15719, r15721, MPFR_RNDN);
        mpfr_tan(r15723, r15718, MPFR_RNDN);
        mpfr_mul(r15724, r15722, r15723, MPFR_RNDN);
        return mpfr_get_d(r15724, MPFR_RNDN);
}

static mpfr_t r15725, r15726, r15727, r15728, r15729, r15730, r15731;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15725);
        mpfr_init(r15726);
        mpfr_init(r15727);
        mpfr_init(r15728);
        mpfr_init(r15729);
        mpfr_init(r15730);
        mpfr_init(r15731);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15725, d, MPFR_RNDN);
        mpfr_log(r15726, r15725, MPFR_RNDN);
        mpfr_set_d(r15727, c, MPFR_RNDN);
        mpfr_abs(r15728, r15727, MPFR_RNDN);
        mpfr_add(r15729, r15726, r15728, MPFR_RNDN);
        mpfr_tan(r15730, r15725, MPFR_RNDN);
        mpfr_mul(r15731, r15729, r15730, MPFR_RNDN);
        return mpfr_get_d(r15731, MPFR_RNDN);
}

