#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 r14734 = x;
        float r14735 = y;
        float r14736 = r14734 + r14735;
        float r14737 = z;
        float r14738 = r14736 + r14737;
        float r14739 = r14735 + r14737;
        float r14740 = r14734 + r14739;
        float r14741 = r14738 - r14740;
        return r14741;
}

double f_id(double x, double y, double z) {
        double r14742 = x;
        double r14743 = y;
        double r14744 = r14742 + r14743;
        double r14745 = z;
        double r14746 = r14744 + r14745;
        double r14747 = r14743 + r14745;
        double r14748 = r14742 + r14747;
        double r14749 = r14746 - r14748;
        return r14749;
}


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

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

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 r14752, r14753, r14754, r14755, r14756, r14757, r14758, r14759;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r14752);
        mpfr_init(r14753);
        mpfr_init(r14754);
        mpfr_init(r14755);
        mpfr_init(r14756);
        mpfr_init(r14757);
        mpfr_init(r14758);
        mpfr_init(r14759);
}

double f_im(double x, double y, double z) {
        mpfr_set_d(r14752, x, MPFR_RNDN);
        mpfr_set_d(r14753, y, MPFR_RNDN);
        mpfr_add(r14754, r14752, r14753, MPFR_RNDN);
        mpfr_set_d(r14755, z, MPFR_RNDN);
        mpfr_add(r14756, r14754, r14755, MPFR_RNDN);
        mpfr_add(r14757, r14753, r14755, MPFR_RNDN);
        mpfr_add(r14758, r14752, r14757, MPFR_RNDN);
        mpfr_sub(r14759, r14756, r14758, MPFR_RNDN);
        return mpfr_get_d(r14759, MPFR_RNDN);
}

static mpfr_t r14760;

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

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

static mpfr_t r14761;

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

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

