#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 r15627 = d;
        float r15628 = log(r15627);
        float r15629 = c;
        float r15630 = fabs(r15629);
        float r15631 = r15628 + r15630;
        float r15632 = tan(r15627);
        float r15633 = r15631 * r15632;
        return r15633;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15634 = d;
        double r15635 = log(r15634);
        double r15636 = c;
        double r15637 = fabs(r15636);
        double r15638 = r15635 + r15637;
        double r15639 = tan(r15634);
        double r15640 = r15638 * r15639;
        return r15640;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15641 = d;
        float r15642 = log(r15641);
        float r15643 = c;
        float r15644 = fabs(r15643);
        float r15645 = r15642 + r15644;
        float r15646 = tan(r15641);
        float r15647 = r15645 * r15646;
        return r15647;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15648 = d;
        double r15649 = log(r15648);
        double r15650 = c;
        double r15651 = fabs(r15650);
        double r15652 = r15649 + r15651;
        double r15653 = tan(r15648);
        double r15654 = r15652 * r15653;
        return r15654;
}

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 r15655, r15656, r15657, r15658, r15659, r15660, r15661;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15655);
        mpfr_init(r15656);
        mpfr_init(r15657);
        mpfr_init(r15658);
        mpfr_init(r15659);
        mpfr_init(r15660);
        mpfr_init(r15661);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15655, d, MPFR_RNDN);
        mpfr_log(r15656, r15655, MPFR_RNDN);
        mpfr_set_d(r15657, c, MPFR_RNDN);
        mpfr_abs(r15658, r15657, MPFR_RNDN);
        mpfr_add(r15659, r15656, r15658, MPFR_RNDN);
        mpfr_tan(r15660, r15655, MPFR_RNDN);
        mpfr_mul(r15661, r15659, r15660, MPFR_RNDN);
        return mpfr_get_d(r15661, MPFR_RNDN);
}

static mpfr_t r15662, r15663, r15664, r15665, r15666, r15667, r15668;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15662);
        mpfr_init(r15663);
        mpfr_init(r15664);
        mpfr_init(r15665);
        mpfr_init(r15666);
        mpfr_init(r15667);
        mpfr_init(r15668);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15662, d, MPFR_RNDN);
        mpfr_log(r15663, r15662, MPFR_RNDN);
        mpfr_set_d(r15664, c, MPFR_RNDN);
        mpfr_abs(r15665, r15664, MPFR_RNDN);
        mpfr_add(r15666, r15663, r15665, MPFR_RNDN);
        mpfr_tan(r15667, r15662, MPFR_RNDN);
        mpfr_mul(r15668, r15666, r15667, MPFR_RNDN);
        return mpfr_get_d(r15668, MPFR_RNDN);
}

static mpfr_t r15669, r15670, r15671, r15672, r15673, r15674, r15675;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15669);
        mpfr_init(r15670);
        mpfr_init(r15671);
        mpfr_init(r15672);
        mpfr_init(r15673);
        mpfr_init(r15674);
        mpfr_init(r15675);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15669, d, MPFR_RNDN);
        mpfr_log(r15670, r15669, MPFR_RNDN);
        mpfr_set_d(r15671, c, MPFR_RNDN);
        mpfr_abs(r15672, r15671, MPFR_RNDN);
        mpfr_add(r15673, r15670, r15672, MPFR_RNDN);
        mpfr_tan(r15674, r15669, MPFR_RNDN);
        mpfr_mul(r15675, r15673, r15674, MPFR_RNDN);
        return mpfr_get_d(r15675, MPFR_RNDN);
}

