#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 r14726 = x;
        float r14727 = y;
        float r14728 = r14726 + r14727;
        float r14729 = z;
        float r14730 = r14728 + r14729;
        float r14731 = r14727 + r14729;
        float r14732 = r14726 + r14731;
        float r14733 = r14730 - r14732;
        return r14733;
}

double f_id(double x, double y, double z) {
        double r14734 = x;
        double r14735 = y;
        double r14736 = r14734 + r14735;
        double r14737 = z;
        double r14738 = r14736 + r14737;
        double r14739 = r14735 + r14737;
        double r14740 = r14734 + r14739;
        double r14741 = r14738 - r14740;
        return r14741;
}


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

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

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 r14744, r14745, r14746, r14747, r14748, r14749, r14750, r14751;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(144);
        mpfr_init(r14744);
        mpfr_init(r14745);
        mpfr_init(r14746);
        mpfr_init(r14747);
        mpfr_init(r14748);
        mpfr_init(r14749);
        mpfr_init(r14750);
        mpfr_init(r14751);
}

double f_im(double x, double y, double z) {
        mpfr_set_d(r14744, x, MPFR_RNDN);
        mpfr_set_d(r14745, y, MPFR_RNDN);
        mpfr_add(r14746, r14744, r14745, MPFR_RNDN);
        mpfr_set_d(r14747, z, MPFR_RNDN);
        mpfr_add(r14748, r14746, r14747, MPFR_RNDN);
        mpfr_add(r14749, r14745, r14747, MPFR_RNDN);
        mpfr_add(r14750, r14744, r14749, MPFR_RNDN);
        mpfr_sub(r14751, r14748, r14750, MPFR_RNDN);
        return mpfr_get_d(r14751, MPFR_RNDN);
}

static mpfr_t r14752;

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

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

static mpfr_t r14753;

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

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

