#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int EXIT_SUCCESS;
double error_absoluto(double, double);
double error_relativo(double, double);
double my_trunc(double, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  double varX8 = 0.71428571;
  double varY8 = 0.33333333;
  double varU8 = 0.714251;
  double varV8 = 98765.9;
  double varX5 = my_trunc(varX8, 5);
  double varY5 = my_trunc(varY8, 5);
  double varU5 = my_trunc(varU8, 5);
  double varV5 = my_trunc(varV8, 5);
  double suma_8 = varX8 + varY8;
  double suma_5 = varX5 + varY5;
  double absoluto_suma = error_absoluto(suma_8, suma_5);
  double relativo_suma = error_relativo(suma_8, suma_5);
  double mult_8 = varX8 * varY8;
  double mult_5 = varX5 * varY5;
  double absoluto_mult = error_absoluto(mult_8, mult_5);
  double relativo_mult = error_relativo(mult_8, mult_5);
  double resta_varU8 = varX8 - varU8;
  double resta_varU5 = varX5 - varU5;
  double absoluto_resta = error_absoluto(resta_varU8, resta_varU5);
  double relativo_resta = error_relativo(resta_varU8, resta_varU5);
  double comb_varV8 = (varX8 - varU8) * varV8;
  double comb_varV5 = (varX5 - varU5) * varV5;
  double absoluto_comb = error_absoluto(comb_varV8, comb_varV5);
  double relativo_comb = error_relativo(comb_varV8, comb_varV5);
  printf("Resultados para operaciones impares\n");
  printf("Operación \t Valor 8 \t\t Aritmética de máquina \t error_absoluto \t "
         "error_relativo\n");
  printf("x+y \t\t %1.8f \t\t %1.5f \t\t %e \t\t %e\n", suma_8, suma_5,
         absoluto_suma, relativo_suma);
  printf("x*y \t\t %1.8f \t\t %1.5f \t\t %e \t\t %e\n", mult_8, mult_5,
         absoluto_mult, relativo_mult);
  printf("x-u \t\t %1.8f \t\t %1.5f \t\t %e \t\t %e\n", resta_varU8,
         resta_varU5, absoluto_resta, relativo_resta);
  printf("(x-u)*v \t %1.8f \t\t %1.5f \t\t %e \t\t %e\n", comb_varV8,
         comb_varV5, absoluto_comb, relativo_comb);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xebe(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe94(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe7f(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x5,%edi
call   1050 <my_trunc@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x5,%edi
call   1050 <my_trunc@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    $0x5,%edi
call   1050 <my_trunc@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    $0x5,%edi
call   1050 <my_trunc@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
call   1030 <error_absoluto@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
call   1060 <error_relativo@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
call   1030 <error_absoluto@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
call   1060 <error_relativo@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
call   1030 <error_absoluto@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
call   1060 <error_relativo@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
call   1030 <error_absoluto@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
call   1060 <error_relativo@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd05(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
lea    0xd36(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
lea    0xd34(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm3
ff
lea    0xd29(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0xc8(%rbp),%xmm3
ff
lea    0xd1e(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
mov    0x2bef(%rip),%rax
mov    (%rax),%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movsd  0xea4(%rip),%xmm0
mov    $0x5,%edi
call   1060 <my_trunc@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xe94(%rip),%xmm0
mov    $0x5,%edi
call   1060 <my_trunc@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xe84(%rip),%xmm0
mov    $0x5,%edi
call   1060 <my_trunc@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0xe74(%rip),%xmm0
mov    $0x5,%edi
call   1060 <my_trunc@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm1
addsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0xe52(%rip),%xmm0
call   1040 <error_absoluto@plt>
movsd  %xmm0,0x60(%rsp)
movsd  0xe3f(%rip),%xmm0
movsd  0x28(%rsp),%xmm1
call   1070 <error_relativo@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x10(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xe1c(%rip),%xmm0
call   1040 <error_absoluto@plt>
movsd  %xmm0,0x50(%rsp)
movsd  0xe09(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
call   1070 <error_relativo@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%rsp),%xmm1
subsd  0x20(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xde6(%rip),%xmm0
call   1040 <error_absoluto@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0xdd3(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
call   1070 <error_relativo@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x18(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0xdb0(%rip),%xmm0
call   1040 <error_absoluto@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0xd9d(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
call   1070 <error_relativo@plt>
movsd  %xmm0,0x30(%rsp)
lea    0xe1c(%rip),%rdi
call   1030 <puts@plt>
lea    0xe34(%rip),%rdi
call   1030 <puts@plt>
lea    0xd75(%rip),%rdi
movsd  0xd4d(%rip),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x60(%rsp),%xmm2
movsd  0x58(%rsp),%xmm3
mov    $0x4,%al
call   1050 <printf@plt>
lea    0xd70(%rip),%rdi
movsd  0xd2d(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x50(%rsp),%xmm2
movsd  0x48(%rsp),%xmm3
mov    $0x4,%al
call   1050 <printf@plt>
lea    0xd6b(%rip),%rdi
movsd  0xd0d(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movsd  0x40(%rsp),%xmm3
mov    $0x4,%al
call   1050 <printf@plt>
lea    0xd66(%rip),%rdi
movsd  0xced(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
movsd  0x30(%rsp),%xmm3
mov    $0x4,%al
call   1050 <printf@plt>
mov    0x2c75(%rip),%rax
mov    (%rax),%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Resultados para operaciones impares\0A\00"
@.str.1 = [83 x i8] c"Operaci\C3\B3n \09 Valor 8 \09\09 Aritm\C3\A9tica de m\C3\A1quina \09 error_absoluto \09 error_relativo\0A\00"
@.str.2 = [35 x i8] c"x+y \09\09 %1.8f \09\09 %1.5f \09\09 %e \09\09 %e\0A\00"
@.str.3 = [35 x i8] c"x*y \09\09 %1.8f \09\09 %1.5f \09\09 %e \09\09 %e\0A\00"
@.str.4 = [35 x i8] c"x-u \09\09 %1.8f \09\09 %1.5f \09\09 %e \09\09 %e\0A\00"
@.str.5 = [38 x i8] c"(x-u)*v \09 %1.8f \09\09 %1.5f \09\09 %e \09\09 %e\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
store i32 0, i32* %1
store double 0x3FE6DB6DB48E678C, double* %2
store double 0x3FD5555551C112DA, double* %3
store double 7.142510e-01, double* %4
store double 0x40F81CDE66666666, double* %5
%26 = load double, double* %2
%27 = call double @my_trunc(double %26, i32 5)
store double %27, double* %6
%28 = load double, double* %3
%29 = call double @my_trunc(double %28, i32 5)
store double %29, double* %7
%30 = load double, double* %4
%31 = call double @my_trunc(double %30, i32 5)
store double %31, double* %8
%32 = load double, double* %5
%33 = call double @my_trunc(double %32, i32 5)
store double %33, double* %9
%34 = load double, double* %2
%35 = load double, double* %3
%36 = fadd double %34, %35
store double %36, double* %10
%37 = load double, double* %6
%38 = load double, double* %7
%39 = fadd double %37, %38
store double %39, double* %11
%40 = load double, double* %10
%41 = load double, double* %11
%42 = call double @error_absoluto(double %40, double %41)
store double %42, double* %12
%43 = load double, double* %10
%44 = load double, double* %11
%45 = call double @error_relativo(double %43, double %44)
store double %45, double* %13
%46 = load double, double* %2
%47 = load double, double* %3
%48 = fmul double %46, %47
store double %48, double* %14
%49 = load double, double* %6
%50 = load double, double* %7
%51 = fmul double %49, %50
store double %51, double* %15
%52 = load double, double* %14
%53 = load double, double* %15
%54 = call double @error_absoluto(double %52, double %53)
store double %54, double* %16
%55 = load double, double* %14
%56 = load double, double* %15
%57 = call double @error_relativo(double %55, double %56)
store double %57, double* %17
%58 = load double, double* %2
%59 = load double, double* %4
%60 = fsub double %58, %59
store double %60, double* %18
%61 = load double, double* %6
%62 = load double, double* %8
%63 = fsub double %61, %62
store double %63, double* %19
%64 = load double, double* %18
%65 = load double, double* %19
%66 = call double @error_absoluto(double %64, double %65)
store double %66, double* %20
%67 = load double, double* %18
%68 = load double, double* %19
%69 = call double @error_relativo(double %67, double %68)
store double %69, double* %21
%70 = load double, double* %2
%71 = load double, double* %4
%72 = fsub double %70, %71
%73 = load double, double* %5
%74 = fmul double %72, %73
store double %74, double* %22
%75 = load double, double* %6
%76 = load double, double* %8
%77 = fsub double %75, %76
%78 = load double, double* %9
%79 = fmul double %77, %78
store double %79, double* %23
%80 = load double, double* %22
%81 = load double, double* %23
%82 = call double @error_absoluto(double %80, double %81)
store double %82, double* %24
%83 = load double, double* %22
%84 = load double, double* %23
%85 = call double @error_relativo(double %83, double %84)
store double %85, double* %25
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.1, i64 0, i64 0))
%88 = load double, double* %10
%89 = load double, double* %11
%90 = load double, double* %12
%91 = load double, double* %13
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %88, double %89, double %90, double %91)
%93 = load double, double* %14
%94 = load double, double* %15
%95 = load double, double* %16
%96 = load double, double* %17
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double %93, double %94, double %95, double %96)
%98 = load double, double* %18
%99 = load double, double* %19
%100 = load double, double* %20
%101 = load double, double* %21
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), double %98, double %99, double %100, double %101)
%103 = load double, double* %22
%104 = load double, double* %23
%105 = load double, double* %24
%106 = load double, double* %25
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), double %103, double %104, double %105, double %106)
%108 = load i32, i32* @EXIT_SUCCESS
ret i32 %108
}

LLVM IR (-O2):
@.str.2 = [35 x i8] c"x+y \09\09 %1.8f \09\09 %1.5f \09\09 %e \09\09 %e\0A\00"
@.str.3 = [35 x i8] c"x*y \09\09 %1.8f \09\09 %1.5f \09\09 %e \09\09 %e\0A\00"
@.str.4 = [35 x i8] c"x-u \09\09 %1.8f \09\09 %1.5f \09\09 %e \09\09 %e\0A\00"
@.str.5 = [38 x i8] c"(x-u)*v \09 %1.8f \09\09 %1.5f \09\09 %e \09\09 %e\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [36 x i8] c"Resultados para operaciones impares\00"
@str.6 = [82 x i8] c"Operaci\C3\B3n \09 Valor 8 \09\09 Aritm\C3\A9tica de m\C3\A1quina \09 error_absoluto \09 error_relativo\00"
define i32 @main() {
%1 = tail call double @my_trunc(double 0x3FE6DB6DB48E678C, i32 5)
%2 = tail call double @my_trunc(double 0x3FD5555551C112DA, i32 5)
%3 = tail call double @my_trunc(double 7.142510e-01, i32 5)
%4 = tail call double @my_trunc(double 0x40F81CDE66666666, i32 5)
%5 = fadd double %1, %2
%6 = tail call double @error_absoluto(double 0x3FF0C30C2EB7787C, double %5)
%7 = tail call double @error_relativo(double 0x3FF0C30C2EB7787C, double %5)
%8 = fmul double %1, %2
%9 = tail call double @error_absoluto(double 0x3FCE79E7964B98CE, double %8)
%10 = tail call double @error_relativo(double 0x3FCE79E7964B98CE, double %8)
%11 = fsub double %1, %3
%12 = tail call double @error_absoluto(double 0x3F0232B284CD0000, double %11)
%13 = tail call double @error_relativo(double 0x3F0232B284CD0000, double %11)
%14 = fmul double %11, %4
%15 = tail call double @error_absoluto(double 0x400B6CE173808314, double %14)
%16 = tail call double @error_relativo(double 0x400B6CE173808314, double %14)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.6, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double 0x3FF0C30C2EB7787C, double %5, double %6, double %7)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), double 0x3FCE79E7964B98CE, double %8, double %9, double %10)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), double 0x3F0232B284CD0000, double %11, double %12, double %13)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), double 0x400B6CE173808314, double %14, double %15, double %16)
%23 = load i32, i32* @EXIT_SUCCESS
ret i32 %23
}