#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 r15542 = d;
        float r15543 = log(r15542);
        float r15544 = c;
        float r15545 = fabs(r15544);
        float r15546 = r15543 + r15545;
        float r15547 = tan(r15542);
        float r15548 = r15546 * r15547;
        return r15548;
}

double f_id(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15549 = d;
        double r15550 = log(r15549);
        double r15551 = c;
        double r15552 = fabs(r15551);
        double r15553 = r15550 + r15552;
        double r15554 = tan(r15549);
        double r15555 = r15553 * r15554;
        return r15555;
}


double f_of(float __attribute__((unused)) a, float __attribute__((unused)) b, float c, float d) {
        float r15556 = d;
        float r15557 = log(r15556);
        float r15558 = c;
        float r15559 = fabs(r15558);
        float r15560 = r15557 + r15559;
        float r15561 = tan(r15556);
        float r15562 = r15560 * r15561;
        return r15562;
}

double f_od(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        double r15563 = d;
        double r15564 = log(r15563);
        double r15565 = c;
        double r15566 = fabs(r15565);
        double r15567 = r15564 + r15566;
        double r15568 = tan(r15563);
        double r15569 = r15567 * r15568;
        return r15569;
}

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 r15570, r15571, r15572, r15573, r15574, r15575, r15576;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r15570);
        mpfr_init(r15571);
        mpfr_init(r15572);
        mpfr_init(r15573);
        mpfr_init(r15574);
        mpfr_init(r15575);
        mpfr_init(r15576);
}

double f_im(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15570, d, MPFR_RNDN);
        mpfr_log(r15571, r15570, MPFR_RNDN);
        mpfr_set_d(r15572, c, MPFR_RNDN);
        mpfr_abs(r15573, r15572, MPFR_RNDN);
        mpfr_add(r15574, r15571, r15573, MPFR_RNDN);
        mpfr_tan(r15575, r15570, MPFR_RNDN);
        mpfr_mul(r15576, r15574, r15575, MPFR_RNDN);
        return mpfr_get_d(r15576, MPFR_RNDN);
}

static mpfr_t r15577, r15578, r15579, r15580, r15581, r15582, r15583;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15577);
        mpfr_init(r15578);
        mpfr_init(r15579);
        mpfr_init(r15580);
        mpfr_init(r15581);
        mpfr_init(r15582);
        mpfr_init(r15583);
}

double f_fm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15577, d, MPFR_RNDN);
        mpfr_log(r15578, r15577, MPFR_RNDN);
        mpfr_set_d(r15579, c, MPFR_RNDN);
        mpfr_abs(r15580, r15579, MPFR_RNDN);
        mpfr_add(r15581, r15578, r15580, MPFR_RNDN);
        mpfr_tan(r15582, r15577, MPFR_RNDN);
        mpfr_mul(r15583, r15581, r15582, MPFR_RNDN);
        return mpfr_get_d(r15583, MPFR_RNDN);
}

static mpfr_t r15584, r15585, r15586, r15587, r15588, r15589, r15590;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init(r15584);
        mpfr_init(r15585);
        mpfr_init(r15586);
        mpfr_init(r15587);
        mpfr_init(r15588);
        mpfr_init(r15589);
        mpfr_init(r15590);
}

double f_dm(double __attribute__((unused)) a, double __attribute__((unused)) b, double c, double d) {
        mpfr_set_d(r15584, d, MPFR_RNDN);
        mpfr_log(r15585, r15584, MPFR_RNDN);
        mpfr_set_d(r15586, c, MPFR_RNDN);
        mpfr_abs(r15587, r15586, MPFR_RNDN);
        mpfr_add(r15588, r15585, r15587, MPFR_RNDN);
        mpfr_tan(r15589, r15584, MPFR_RNDN);
        mpfr_mul(r15590, r15588, r15589, MPFR_RNDN);
        return mpfr_get_d(r15590, MPFR_RNDN);
}

