#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 r21270 = x;
        float r21271 = y;
        float r21272 = r21270 + r21271;
        float r21273 = z;
        float r21274 = r21272 + r21273;
        float r21275 = r21271 + r21273;
        float r21276 = r21270 + r21275;
        float r21277 = r21274 - r21276;
        return r21277;
}

double f_id(double x, double y, double z) {
        double r21278 = x;
        double r21279 = y;
        double r21280 = r21278 + r21279;
        double r21281 = z;
        double r21282 = r21280 + r21281;
        double r21283 = r21279 + r21281;
        double r21284 = r21278 + r21283;
        double r21285 = r21282 - r21284;
        return r21285;
}


double f_of(float __attribute__((unused)) x, float __attribute__((unused)) y, float __attribute__((unused)) z) {
        float r21286 = 0;
        return r21286;
}

double f_od(double __attribute__((unused)) x, double __attribute__((unused)) y, double __attribute__((unused)) z) {
        double r21287 = 0;
        return r21287;
}

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 r21288, r21289, r21290, r21291, r21292, r21293, r21294, r21295;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(1872);
        mpfr_init(r21288);
        mpfr_init(r21289);
        mpfr_init(r21290);
        mpfr_init(r21291);
        mpfr_init(r21292);
        mpfr_init(r21293);
        mpfr_init(r21294);
        mpfr_init(r21295);
}

double f_im(double x, double y, double z) {
        mpfr_set_d(r21288, x, MPFR_RNDN);
        mpfr_set_d(r21289, y, MPFR_RNDN);
        mpfr_add(r21290, r21288, r21289, MPFR_RNDN);
        mpfr_set_d(r21291, z, MPFR_RNDN);
        mpfr_add(r21292, r21290, r21291, MPFR_RNDN);
        mpfr_add(r21293, r21289, r21291, MPFR_RNDN);
        mpfr_add(r21294, r21288, r21293, MPFR_RNDN);
        mpfr_sub(r21295, r21292, r21294, MPFR_RNDN);
        return mpfr_get_d(r21295, MPFR_RNDN);
}

static mpfr_t r21296;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(1872);
        mpfr_init_set_str(r21296, "0", 10, MPFR_RNDN);
}

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

static mpfr_t r21297;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(1872);
        mpfr_init_set_str(r21297, "0", 10, MPFR_RNDN);
}

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

