#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 r21303 = x;
        float r21304 = y;
        float r21305 = r21303 + r21304;
        float r21306 = z;
        float r21307 = r21305 + r21306;
        float r21308 = r21304 + r21306;
        float r21309 = r21303 + r21308;
        float r21310 = r21307 - r21309;
        return r21310;
}

double f_id(double x, double y, double z) {
        double r21311 = x;
        double r21312 = y;
        double r21313 = r21311 + r21312;
        double r21314 = z;
        double r21315 = r21313 + r21314;
        double r21316 = r21312 + r21314;
        double r21317 = r21311 + r21316;
        double r21318 = r21315 - r21317;
        return r21318;
}


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

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

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 r21321, r21322, r21323, r21324, r21325, r21326, r21327, r21328;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(2192);
        mpfr_init(r21321);
        mpfr_init(r21322);
        mpfr_init(r21323);
        mpfr_init(r21324);
        mpfr_init(r21325);
        mpfr_init(r21326);
        mpfr_init(r21327);
        mpfr_init(r21328);
}

double f_im(double x, double y, double z) {
        mpfr_set_d(r21321, x, MPFR_RNDN);
        mpfr_set_d(r21322, y, MPFR_RNDN);
        mpfr_add(r21323, r21321, r21322, MPFR_RNDN);
        mpfr_set_d(r21324, z, MPFR_RNDN);
        mpfr_add(r21325, r21323, r21324, MPFR_RNDN);
        mpfr_add(r21326, r21322, r21324, MPFR_RNDN);
        mpfr_add(r21327, r21321, r21326, MPFR_RNDN);
        mpfr_sub(r21328, r21325, r21327, MPFR_RNDN);
        return mpfr_get_d(r21328, MPFR_RNDN);
}

static mpfr_t r21329;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(2192);
        mpfr_init_set_str(r21329, "0", 10, MPFR_RNDN);
}

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

static mpfr_t r21330;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(2192);
        mpfr_init_set_str(r21330, "0", 10, MPFR_RNDN);
}

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

