#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 r15619 = d;
        float r15620 = log(r15619);
        float r15621 = c;
        float r15622 = fabs(r15621);
        float r15623 = r15620 + r15622;
        float r15624 = tan(r15619);
        float r15625 = r15623 * r15624;
        return r15625;
}

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


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

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

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 r15647, r15648, r15649, r15650, r15651, r15652, r15653;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15647);
        mpfr_init(r15648);
        mpfr_init(r15649);
        mpfr_init(r15650);
        mpfr_init(r15651);
        mpfr_init(r15652);
        mpfr_init(r15653);
}

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

static mpfr_t r15654, r15655, r15656, r15657, r15658, r15659, r15660;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15654);
        mpfr_init(r15655);
        mpfr_init(r15656);
        mpfr_init(r15657);
        mpfr_init(r15658);
        mpfr_init(r15659);
        mpfr_init(r15660);
}

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

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

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15661);
        mpfr_init(r15662);
        mpfr_init(r15663);
        mpfr_init(r15664);
        mpfr_init(r15665);
        mpfr_init(r15666);
        mpfr_init(r15667);
}

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

