#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 r15662 = d;
        float r15663 = log(r15662);
        float r15664 = c;
        float r15665 = fabs(r15664);
        float r15666 = r15663 + r15665;
        float r15667 = tan(r15662);
        float r15668 = r15666 * r15667;
        return r15668;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15669 = d;
        double r15670 = log(r15669);
        double r15671 = c;
        double r15672 = fabs(r15671);
        double r15673 = r15670 + r15672;
        double r15674 = tan(r15669);
        double r15675 = r15673 * r15674;
        return r15675;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15676 = d;
        float r15677 = log(r15676);
        float r15678 = c;
        float r15679 = fabs(r15678);
        float r15680 = r15677 + r15679;
        float r15681 = tan(r15676);
        float r15682 = r15680 * r15681;
        return r15682;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15683 = d;
        double r15684 = log(r15683);
        double r15685 = c;
        double r15686 = fabs(r15685);
        double r15687 = r15684 + r15686;
        double r15688 = tan(r15683);
        double r15689 = r15687 * r15688;
        return r15689;
}

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 r15690, r15691, r15692, r15693, r15694, r15695, r15696;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15690);
        mpfr_init(r15691);
        mpfr_init(r15692);
        mpfr_init(r15693);
        mpfr_init(r15694);
        mpfr_init(r15695);
        mpfr_init(r15696);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15690, d, MPFR_RNDN);
        mpfr_log(r15691, r15690, MPFR_RNDN);
        mpfr_set_d(r15692, c, MPFR_RNDN);
        mpfr_abs(r15693, r15692, MPFR_RNDN);
        mpfr_add(r15694, r15691, r15693, MPFR_RNDN);
        mpfr_tan(r15695, r15690, MPFR_RNDN);
        mpfr_mul(r15696, r15694, r15695, MPFR_RNDN);
        return mpfr_get_d(r15696, MPFR_RNDN);
}

static mpfr_t r15697, r15698, r15699, r15700, r15701, r15702, r15703;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15697);
        mpfr_init(r15698);
        mpfr_init(r15699);
        mpfr_init(r15700);
        mpfr_init(r15701);
        mpfr_init(r15702);
        mpfr_init(r15703);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15697, d, MPFR_RNDN);
        mpfr_log(r15698, r15697, MPFR_RNDN);
        mpfr_set_d(r15699, c, MPFR_RNDN);
        mpfr_abs(r15700, r15699, MPFR_RNDN);
        mpfr_add(r15701, r15698, r15700, MPFR_RNDN);
        mpfr_tan(r15702, r15697, MPFR_RNDN);
        mpfr_mul(r15703, r15701, r15702, MPFR_RNDN);
        return mpfr_get_d(r15703, MPFR_RNDN);
}

static mpfr_t r15704, r15705, r15706, r15707, r15708, r15709, r15710;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15704);
        mpfr_init(r15705);
        mpfr_init(r15706);
        mpfr_init(r15707);
        mpfr_init(r15708);
        mpfr_init(r15709);
        mpfr_init(r15710);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15704, d, MPFR_RNDN);
        mpfr_log(r15705, r15704, MPFR_RNDN);
        mpfr_set_d(r15706, c, MPFR_RNDN);
        mpfr_abs(r15707, r15706, MPFR_RNDN);
        mpfr_add(r15708, r15705, r15707, MPFR_RNDN);
        mpfr_tan(r15709, r15704, MPFR_RNDN);
        mpfr_mul(r15710, r15708, r15709, MPFR_RNDN);
        return mpfr_get_d(r15710, MPFR_RNDN);
}

