#include <tgmath.h>
#include <gmp.h>
#include <mpfr.h>
#include <stdio.h>
#include <stdbool.h>

char *name = "Commute and associate";

double f_if(float x, float y, float z) {
        float r14730 = x;
        float r14731 = y;
        float r14732 = r14730 + r14731;
        float r14733 = z;
        float r14734 = r14732 + r14733;
        float r14735 = r14731 + r14733;
        float r14736 = r14730 + r14735;
        float r14737 = r14734 - r14736;
        return r14737;
}

double f_id(double x, double y, double z) {
        double r14738 = x;
        double r14739 = y;
        double r14740 = r14738 + r14739;
        double r14741 = z;
        double r14742 = r14740 + r14741;
        double r14743 = r14739 + r14741;
        double r14744 = r14738 + r14743;
        double r14745 = r14742 - r14744;
        return r14745;
}


double f_of(float __attribute__((unused)) x, float __attribute__((unused)) y, float __attribute__((unused)) z) {
        float r14746 = 0.0f;
        return r14746;
}

double f_od(double __attribute__((unused)) x, double __attribute__((unused)) y, double __attribute__((unused)) z) {
        double r14747 = 0.0;
        return r14747;
}

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 r14748, r14749, r14750, r14751, r14752, r14753, r14754, r14755;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r14748);
        mpfr_init(r14749);
        mpfr_init(r14750);
        mpfr_init(r14751);
        mpfr_init(r14752);
        mpfr_init(r14753);
        mpfr_init(r14754);
        mpfr_init(r14755);
}

double f_im(double x, double y, double z) {
        mpfr_set_d(r14748, x, MPFR_RNDN);
        mpfr_set_d(r14749, y, MPFR_RNDN);
        mpfr_add(r14750, r14748, r14749, MPFR_RNDN);
        mpfr_set_d(r14751, z, MPFR_RNDN);
        mpfr_add(r14752, r14750, r14751, MPFR_RNDN);
        mpfr_add(r14753, r14749, r14751, MPFR_RNDN);
        mpfr_add(r14754, r14748, r14753, MPFR_RNDN);
        mpfr_sub(r14755, r14752, r14754, MPFR_RNDN);
        return mpfr_get_d(r14755, MPFR_RNDN);
}

static mpfr_t r14756;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(144);
        mpfr_init_set_str(r14756, "0", 10, MPFR_RNDN);
}

double f_fm(double __attribute__((unused)) x, double __attribute__((unused)) y, double __attribute__((unused)) z) {
        ;
        return mpfr_get_d(r14756, MPFR_RNDN);
}

static mpfr_t r14757;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(144);
        mpfr_init_set_str(r14757, "0", 10, MPFR_RNDN);
}

double f_dm(double __attribute__((unused)) x, double __attribute__((unused)) y, double __attribute__((unused)) z) {
        ;
        return mpfr_get_d(r14757, MPFR_RNDN);
}

