#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 */
double fabs(double);
int /*<<< orphan*/ printf(char *, ...);
double truncf(double);
void main() {
  double atruncar[4] = {1e5, 1e4, 1e4, 1};
  double val_8[4], temp[4];
  double x_8 = 0.714285714285714;
  double y_8 = 0.333333333333333;
  double u_8 = 0.714251;
  double v_8 = 98765.9;
  double w_8 = 0.111111e-4;
  double x_5, y_5, u_5, v_5, w_5, temp3;
  double aritm_maq, errA, errR;
  x_5 = truncf(x_8 * 1e5) / 1e5;
  y_5 = truncf(y_8 * 1e5) / 1e5;
  u_5 = truncf(u_8 * 1e5) / 1e5;
  v_5 = truncf(v_8);
  w_5 = truncf(w_8 * 1e9) / 1e9;
  val_8[0] = x_8 - y_8;
  temp[0] = x_5 - y_5;
  val_8[1] = x_8 / y_8;
  temp[1] = x_5 / y_5;
  val_8[2] = (x_8 - u_8) / w_8;
  temp3 = x_5 - u_5;
  temp3 = truncf(temp3 * 1e5) / 1e5;
  temp[2] = temp3 / w_5;
  val_8[3] = u_8 + v_8;
  temp[3] = u_5 + v_5;
  printf("x = %1.8f\ty = %1.8f\tu = %1.7f\tv = %1.2f\tw = %1.11f\n", x_8, y_8,
         u_8, v_8, w_8);
  printf("operaciones pares:\n2) x-y\n4) x/y\n6) (x-u)/w\n8) u+v\n\n");
  printf("operación\tValor a 8\t\tAritmética de Máquina\tError "
         "Absoluto\t\tError Relativo\n");
  for (int i = 0; i < 4; i++) {
    aritm_maq = truncf(temp[i] * atruncar[i]) / atruncar[i];
    errA = fabs(val_8[i] - aritm_maq);
    errR = errA / fabs(val_8[i]);
    printf("%d\t\t%e\t\t%e\t\t%e\t\t%e\n", (i + 1) * 2, val_8[i], aritm_maq,
           errA, errR);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0xf1e(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xf1b(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xf18(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xf15(%rip),%rax
mov    %rax,-0x8(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xea7(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe92(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe7d(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe5d(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
call   1040 <truncf@plt>
movsd  0xe4b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xe37(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
call   1040 <truncf@plt>
movsd  0xe25(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xe11(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1040 <truncf@plt>
movsd  0xdff(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1040 <truncf@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xde1(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
call   1040 <truncf@plt>
movsd  0xdcc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
divsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0x68(%rbp),%xmm0
subsd  -0x78(%rbp),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x30(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xd39(%rip),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
call   1040 <truncf@plt>
movsd  0xd24(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
divsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
movsd  -0x78(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x48(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm3
movsd  -0x88(%rbp),%xmm4
ff
lea    0xd2c(%rip),%rdi
mov    $0x5,%al
call   1030 <printf@plt>
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xd4(%rbp)
cmpl   $0x4,-0xd4(%rbp)
jge    1459 <main+0x339>
movslq -0xd4(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movslq -0xd4(%rbp),%rax
mulsd  -0x20(%rbp,%rax,8),%xmm0
call   1040 <truncf@plt>
movslq -0xd4(%rbp),%rax
divsd  -0x20(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movslq -0xd4(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm0
subsd  -0xc0(%rbp),%xmm0
ff
movaps 0xc72(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movslq -0xd4(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm1
movaps 0xc4a(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0xd4(%rbp),%esi
add    $0x1,%esi
shl    $0x1,%esi
movslq -0xd4(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm0
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xd0(%rbp),%xmm3
ff
lea    0xce9(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1371 <main+0x251>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xec7(%rip),%xmm0
call   1050 <truncf@plt>
movsd  0xec2(%rip),%xmm0
call   1050 <truncf@plt>
movsd  0xebd(%rip),%xmm0
call   1050 <truncf@plt>
movsd  0xeb8(%rip),%xmm0
call   1050 <truncf@plt>
movsd  0xeb3(%rip),%xmm0
call   1050 <truncf@plt>
movsd  0xeae(%rip),%xmm0
call   1050 <truncf@plt>
lea    0xf6a(%rip),%rdi
movsd  0xea2(%rip),%xmm0
movsd  0xea2(%rip),%xmm1
movsd  0xea2(%rip),%xmm2
movsd  0xea2(%rip),%xmm4
movsd  0xe6a(%rip),%xmm3
mov    $0x5,%al
call   1040 <printf@plt>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa4(%rip),%rdi
call   1030 <puts@plt>
movsd  0xe7b(%rip),%xmm0
call   1050 <truncf@plt>
lea    0xf43(%rip),%rbx
movsd  0xe6f(%rip),%xmm0
movsd  0xe6f(%rip),%xmm1
movsd  0xe6f(%rip),%xmm2
movsd  0xe6f(%rip),%xmm3
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0xe60(%rip),%xmm0
call   1050 <truncf@plt>
movsd  0xe5b(%rip),%xmm0
movsd  0xe5b(%rip),%xmm1
movsd  0xe5b(%rip),%xmm2
movsd  0xe5b(%rip),%xmm3
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0xe4c(%rip),%xmm0
call   1050 <truncf@plt>
movsd  0xe47(%rip),%xmm0
movsd  0xe47(%rip),%xmm1
movsd  0xe47(%rip),%xmm2
movsd  0xe47(%rip),%xmm3
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0xe38(%rip),%xmm0
call   1050 <truncf@plt>
movsd  0xe33(%rip),%xmm0
movsd  0xe33(%rip),%xmm1
movsd  0xe33(%rip),%xmm2
movsd  0xe33(%rip),%xmm3
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x4,%al
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@__const.main.atruncar = [4 x double] [double 1.000000e+05, double 1.000000e+04, double 1.000000e+04, double 1.000000e+00]
@.str = [52 x i8] c"x = %1.8f\09y = %1.8f\09u = %1.7f\09v = %1.2f\09w = %1.11f\0A\00"
@.str.1 = [53 x i8] c"operaciones pares:\0A2) x-y\0A4) x/y\0A6) (x-u)/w\0A8) u+v\0A\0A\00"
@.str.2 = [78 x i8] c"operaci\C3\B3n\09Valor a 8\09\09Aritm\C3\A9tica de M\C3\A1quina\09Error Absoluto\09\09Error Relativo\0A\00"
@.str.3 = [20 x i8] c"%d\09\09%e\09\09%e\09\09%e\09\09%e\0A\00"
define void @main() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x 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 i32
%19 = bitcast [4 x double]* %1 to i8*
store double 0x3FE6DB6DB6DB6DB4, double* %4
store double 0x3FD555555555554F, double* %5
store double 7.142510e-01, double* %6
store double 0x40F81CDE66666666, double* %7
store double 1.111110e-05, double* %8
%20 = load double, double* %4
%21 = fmul double %20, 1.000000e+05
%22 = call double @truncf(double %21)
%23 = fdiv double %22, 1.000000e+05
store double %23, double* %9
%24 = load double, double* %5
%25 = fmul double %24, 1.000000e+05
%26 = call double @truncf(double %25)
%27 = fdiv double %26, 1.000000e+05
store double %27, double* %10
%28 = load double, double* %6
%29 = fmul double %28, 1.000000e+05
%30 = call double @truncf(double %29)
%31 = fdiv double %30, 1.000000e+05
store double %31, double* %11
%32 = load double, double* %7
%33 = call double @truncf(double %32)
store double %33, double* %12
%34 = load double, double* %8
%35 = fmul double %34, 1.000000e+09
%36 = call double @truncf(double %35)
%37 = fdiv double %36, 1.000000e+09
store double %37, double* %13
%38 = load double, double* %4
%39 = load double, double* %5
%40 = fsub double %38, %39
%41 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
store double %40, double* %41
%42 = load double, double* %9
%43 = load double, double* %10
%44 = fsub double %42, %43
%45 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
store double %44, double* %45
%46 = load double, double* %4
%47 = load double, double* %5
%48 = fdiv double %46, %47
%49 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 1
store double %48, double* %49
%50 = load double, double* %9
%51 = load double, double* %10
%52 = fdiv double %50, %51
%53 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 1
store double %52, double* %53
%54 = load double, double* %4
%55 = load double, double* %6
%56 = fsub double %54, %55
%57 = load double, double* %8
%58 = fdiv double %56, %57
%59 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 2
store double %58, double* %59
%60 = load double, double* %9
%61 = load double, double* %11
%62 = fsub double %60, %61
store double %62, double* %14
%63 = load double, double* %14
%64 = fmul double %63, 1.000000e+05
%65 = call double @truncf(double %64)
%66 = fdiv double %65, 1.000000e+05
store double %66, double* %14
%67 = load double, double* %14
%68 = load double, double* %13
%69 = fdiv double %67, %68
%70 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 2
store double %69, double* %70
%71 = load double, double* %6
%72 = load double, double* %7
%73 = fadd double %71, %72
%74 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 3
store double %73, double* %74
%75 = load double, double* %11
%76 = load double, double* %12
%77 = fadd double %75, %76
%78 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 3
store double %77, double* %78
%79 = load double, double* %4
%80 = load double, double* %5
%81 = load double, double* %6
%82 = load double, double* %7
%83 = load double, double* %8
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), double %79, double %80, double %81, double %82, double %83)
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %18
br label %87
87: ; preds = %131, %0
%88 = load i32, i32* %18
%89 = icmp slt i32 %88, 4
br i1 %89, label %90, label %134
90: ; preds = %87
%91 = load i32, i32* %18
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 %92
%94 = load double, double* %93
%95 = load i32, i32* %18
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 %96
%98 = load double, double* %97
%99 = fmul double %94, %98
%100 = call double @truncf(double %99)
%101 = load i32, i32* %18
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 %102
%104 = load double, double* %103
%105 = fdiv double %100, %104
store double %105, double* %15
%106 = load i32, i32* %18
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 %107
%109 = load double, double* %108
%110 = load double, double* %15
%111 = fsub double %109, %110
%112 = call double @llvm.fabs.f64(double %111)
store double %112, double* %16
%113 = load double, double* %16
%114 = load i32, i32* %18
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 %115
%117 = load double, double* %116
%118 = call double @llvm.fabs.f64(double %117)
%119 = fdiv double %113, %118
store double %119, double* %17
%120 = load i32, i32* %18
%121 = add nsw i32 %120, 1
%122 = mul nsw i32 %121, 2
%123 = load i32, i32* %18
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 %124
%126 = load double, double* %125
%127 = load double, double* %15
%128 = load double, double* %16
%129 = load double, double* %17
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %122, double %126, double %127, double %128, double %129)
br label %131
131: ; preds = %90
%132 = load i32, i32* %18
%133 = add nsw i32 %132, 1
store i32 %133, i32* %18
br label %87
134: ; preds = %87
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"x = %1.8f\09y = %1.8f\09u = %1.7f\09v = %1.2f\09w = %1.11f\0A\00"
@.str.3 = [20 x i8] c"%d\09\09%e\09\09%e\09\09%e\09\09%e\0A\00"
@str = [52 x i8] c"operaciones pares:\0A2) x-y\0A4) x/y\0A6) (x-u)/w\0A8) u+v\0A\00"
@str.4 = [77 x i8] c"operaci\C3\B3n\09Valor a 8\09\09Aritm\C3\A9tica de M\C3\A1quina\09Error Absoluto\09\09Error Relativo\00"
define void @main() {
%1 = tail call double @truncf(double 0x40F1704924924922)
%2 = tail call double @truncf(double 0x40E046AAAAAAAAA6)
%3 = tail call double @truncf(double 0x40F1701199999999)
%4 = tail call double @truncf(double 0x40F81CDE66666666)
%5 = tail call double @truncf(double 0x40C5B38CCCCCCCCC)
%6 = tail call double @truncf(double 0x4007FFFFFFFFE990)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), double 0x3FE6DB6DB6DB6DB4, double 0x3FD555555555554F, double 7.142510e-01, double 0x40F81CDE66666666, double 1.111110e-05)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.4, i64 0, i64 0))
%10 = tail call double @truncf(double 3.809500e+04)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 2, double 0x3FD8618618618619, double 3.809500e-01, double 0x3EC3F90E69FE0000, double 0x3EDA36E2EB1D5FFF)
%12 = tail call double @truncf(double 0x40D4ED275076D37F)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 4, double 0x400124924924924C, double 2.142800e+00, double 0x3F0DF5959EFF0000, double 0x3EFBF64761324440)
%14 = tail call double @truncf(double 0x40D1940B85264514)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 6, double 0x4008FE8B25869931, double 1.800000e+00, double 0x3FF530497E406595, double 0x3FDB20AAF9E3265F)
%16 = tail call double @truncf(double 0x40F81CDB6D916873)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 8, double 0x40F81CE9D3F8DB48, double 9.876500e+04, double 0x3FF9D3F8DB480000, double 0x3EF12355B51EECFB)
ret void
}