#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 r21279 = x;
        float r21280 = y;
        float r21281 = r21279 + r21280;
        float r21282 = z;
        float r21283 = r21281 + r21282;
        float r21284 = r21280 + r21282;
        float r21285 = r21279 + r21284;
        float r21286 = r21283 - r21285;
        return r21286;
}

double f_id(double x, double y, double z) {
        double r21287 = x;
        double r21288 = y;
        double r21289 = r21287 + r21288;
        double r21290 = z;
        double r21291 = r21289 + r21290;
        double r21292 = r21288 + r21290;
        double r21293 = r21287 + r21292;
        double r21294 = r21291 - r21293;
        return r21294;
}


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

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

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 r21297, r21298, r21299, r21300, r21301, r21302, r21303, r21304;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(1872);
        mpfr_init(r21297);
        mpfr_init(r21298);
        mpfr_init(r21299);
        mpfr_init(r21300);
        mpfr_init(r21301);
        mpfr_init(r21302);
        mpfr_init(r21303);
        mpfr_init(r21304);
}

double f_im(double x, double y, double z) {
        mpfr_set_d(r21297, x, MPFR_RNDN);
        mpfr_set_d(r21298, y, MPFR_RNDN);
        mpfr_add(r21299, r21297, r21298, MPFR_RNDN);
        mpfr_set_d(r21300, z, MPFR_RNDN);
        mpfr_add(r21301, r21299, r21300, MPFR_RNDN);
        mpfr_add(r21302, r21298, r21300, MPFR_RNDN);
        mpfr_add(r21303, r21297, r21302, MPFR_RNDN);
        mpfr_sub(r21304, r21301, r21303, MPFR_RNDN);
        return mpfr_get_d(r21304, MPFR_RNDN);
}

static mpfr_t r21305;

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

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

static mpfr_t r21306;

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

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

