#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 r20164 = x;
        float r20165 = y;
        float r20166 = r20164 + r20165;
        float r20167 = z;
        float r20168 = r20166 + r20167;
        float r20169 = r20165 + r20167;
        float r20170 = r20164 + r20169;
        float r20171 = r20168 - r20170;
        return r20171;
}

double f_id(double x, double y, double z) {
        double r20172 = x;
        double r20173 = y;
        double r20174 = r20172 + r20173;
        double r20175 = z;
        double r20176 = r20174 + r20175;
        double r20177 = r20173 + r20175;
        double r20178 = r20172 + r20177;
        double r20179 = r20176 - r20178;
        return r20179;
}


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

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

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 r20182, r20183, r20184, r20185, r20186, r20187, r20188, r20189;

void setup_mpfr_f_im() {
        mpfr_set_default_prec(1680);
        mpfr_init(r20182);
        mpfr_init(r20183);
        mpfr_init(r20184);
        mpfr_init(r20185);
        mpfr_init(r20186);
        mpfr_init(r20187);
        mpfr_init(r20188);
        mpfr_init(r20189);
}

double f_im(double x, double y, double z) {
        mpfr_set_d(r20182, x, MPFR_RNDN);
        mpfr_set_d(r20183, y, MPFR_RNDN);
        mpfr_add(r20184, r20182, r20183, MPFR_RNDN);
        mpfr_set_d(r20185, z, MPFR_RNDN);
        mpfr_add(r20186, r20184, r20185, MPFR_RNDN);
        mpfr_add(r20187, r20183, r20185, MPFR_RNDN);
        mpfr_add(r20188, r20182, r20187, MPFR_RNDN);
        mpfr_sub(r20189, r20186, r20188, MPFR_RNDN);
        return mpfr_get_d(r20189, MPFR_RNDN);
}

static mpfr_t r20190;

void setup_mpfr_f_fm() {
        mpfr_set_default_prec(1680);
        mpfr_init_set_str(r20190, "0", 10, MPFR_RNDN);
}

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

static mpfr_t r20191;

void setup_mpfr_f_dm() {
        mpfr_set_default_prec(1680);
        mpfr_init_set_str(r20191, "0", 10, MPFR_RNDN);
}

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

