#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 err_abs(double, double);
int err_rel(double, double);
int /*<<< orphan*/ printf(char *, ...);
double trun5(double);
double trun8(double);
int main() {
  double x_8 = 0.71428571;
  double y_8 = 0.33333333;
  double u_8 = 0.714251;
  double v_8 = 98765.9;
  double x_5 = trun5(x_8);
  double y_5 = trun5(y_8);
  double u_5 = trun5(u_8);
  double v_5 = trun5(v_8);
  double op1_8 = trun8(x_8 + y_8);
  double op2_8 = trun8(x_8 * y_8);
  double op3_8 = trun8(x_8 - u_8);
  double op4_8 = trun8((x_8 - u_8) * v_8);
  double op1_5 = trun5(x_5 + y_5);
  double op2_5 = trun5(x_5 * y_5);
  double op3_5 = trun5(x_5 - u_5);
  double op4_5 = trun5((x_5 - u_5) * v_5);
  printf(
      "Operación \t\t Valoa a 8 \t\t Arit. de Máquina \t Err Abs \t Err R \n");
  printf("x + y \t\t\t %1.8f \t\t %1.8f \t\t %1.8f \t\t %1.8f %% \n", op1_8,
         op1_5, err_abs(op1_8, op1_5), err_rel(op1_8, op1_5) * 100);
  printf("x * y \t\t\t %1.8f \t\t %1.8f \t\t %1.8f \t\t %1.8f %% \n", op2_8,
         op2_5, err_abs(op2_8, op2_5), err_rel(op2_8, op2_5) * 100);
  printf("x - u \t\t\t %1.8f \t\t %1.8f \t\t %1.8f \t\t %1.8f %% \n", op3_8,
         op3_5, err_abs(op3_8, op3_5), err_rel(op3_8, op3_5) * 100);
  printf("(x - u)/v \t\t %1.8f \t\t %1.8f \t\t %1.8f \t\t %1.8f %% \n", op4_8,
         op4_5, err_abs(op4_8, op4_5), err_rel(op4_8, op4_5) * 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeae(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe99(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe84(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe6f(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <trun5@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <trun5@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1050 <trun5@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <trun5@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1030 <trun8@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1030 <trun8@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
call   1030 <trun8@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1030 <trun8@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
call   1050 <trun5@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1050 <trun5@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
call   1050 <trun5@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1050 <trun5@plt>
movsd  %xmm0,-0x88(%rbp)
ff
lea    0xd9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
call   1060 <err_abs@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
call   1070 <err_rel@plt>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm2
ff
imul   $0x64,%eax,%esi
lea    0xd72(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
call   1060 <err_abs@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
call   1070 <err_rel@plt>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm2
ff
imul   $0x64,%eax,%esi
lea    0xd39(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
call   1060 <err_abs@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
call   1070 <err_rel@plt>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
movsd  -0xa8(%rbp),%xmm2
ff
imul   $0x64,%eax,%esi
lea    0xd00(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
call   1060 <err_abs@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
call   1070 <err_rel@plt>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm2
ff
imul   $0x64,%eax,%esi
lea    0xcbe(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movsd  0xe94(%rip),%xmm0
call   1060 <trun5@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xe89(%rip),%xmm0
call   1060 <trun5@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xe7e(%rip),%xmm0
call   1060 <trun5@plt>
movsd  %xmm0,0x50(%rsp)
movsd  0xe73(%rip),%xmm0
call   1060 <trun5@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0xe68(%rip),%xmm0
call   1030 <trun8@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xe5d(%rip),%xmm0
call   1030 <trun8@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0xe52(%rip),%xmm0
call   1030 <trun8@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0xe47(%rip),%xmm0
call   1030 <trun8@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
call   1060 <trun5@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1060 <trun5@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x8(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1060 <trun5@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0x30(%rsp),%xmm0
call   1060 <trun5@plt>
movsd  %xmm0,0x8(%rsp)
lea    0xe9e(%rip),%rdi
call   1040 <puts@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
call   1070 <err_abs@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x18(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
call   1080 <err_rel@plt>
imul   $0x64,%eax,%esi
lea    0xda4(%rip),%rdi
movsd  0x18(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
mov    $0x3,%al
call   1050 <printf@plt>
movsd  0x20(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
call   1070 <err_abs@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
call   1080 <err_rel@plt>
imul   $0x64,%eax,%esi
lea    0xd89(%rip),%rdi
movsd  0x20(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
mov    $0x3,%al
call   1050 <printf@plt>
movsd  0x28(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1070 <err_abs@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x28(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1080 <err_rel@plt>
imul   $0x64,%eax,%esi
lea    0xd6e(%rip),%rdi
movsd  0x28(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
mov    $0x3,%al
call   1050 <printf@plt>
movsd  0x48(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1070 <err_abs@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x48(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1080 <err_rel@plt>
imul   $0x64,%eax,%esi
lea    0xd53(%rip),%rdi
movsd  0x48(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
mov    $0x3,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@.str = [65 x i8] c"Operaci\C3\B3n \09\09 Valoa a 8 \09\09 Arit. de M\C3\A1quina \09 Err Abs \09 Err R \0A\00"
@.str.1 = [48 x i8] c"x + y \09\09\09 %1.8f \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f %% \0A\00"
@.str.2 = [48 x i8] c"x * y \09\09\09 %1.8f \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f %% \0A\00"
@.str.3 = [48 x i8] c"x - u \09\09\09 %1.8f \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f %% \0A\00"
@.str.4 = [51 x i8] c"(x - u)/v \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f %% \0A\00"
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
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
%18 = load double, double* %2
%19 = call double @trun5(double %18)
store double %19, double* %6
%20 = load double, double* %3
%21 = call double @trun5(double %20)
store double %21, double* %7
%22 = load double, double* %4
%23 = call double @trun5(double %22)
store double %23, double* %8
%24 = load double, double* %5
%25 = call double @trun5(double %24)
store double %25, double* %9
%26 = load double, double* %2
%27 = load double, double* %3
%28 = fadd double %26, %27
%29 = call double @trun8(double %28)
store double %29, double* %10
%30 = load double, double* %2
%31 = load double, double* %3
%32 = fmul double %30, %31
%33 = call double @trun8(double %32)
store double %33, double* %11
%34 = load double, double* %2
%35 = load double, double* %4
%36 = fsub double %34, %35
%37 = call double @trun8(double %36)
store double %37, double* %12
%38 = load double, double* %2
%39 = load double, double* %4
%40 = fsub double %38, %39
%41 = load double, double* %5
%42 = fmul double %40, %41
%43 = call double @trun8(double %42)
store double %43, double* %13
%44 = load double, double* %6
%45 = load double, double* %7
%46 = fadd double %44, %45
%47 = call double @trun5(double %46)
store double %47, double* %14
%48 = load double, double* %6
%49 = load double, double* %7
%50 = fmul double %48, %49
%51 = call double @trun5(double %50)
store double %51, double* %15
%52 = load double, double* %6
%53 = load double, double* %8
%54 = fsub double %52, %53
%55 = call double @trun5(double %54)
store double %55, double* %16
%56 = load double, double* %6
%57 = load double, double* %8
%58 = fsub double %56, %57
%59 = load double, double* %9
%60 = fmul double %58, %59
%61 = call double @trun5(double %60)
store double %61, double* %17
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%63 = load double, double* %10
%64 = load double, double* %14
%65 = load double, double* %10
%66 = load double, double* %14
%67 = call double @err_abs(double %65, double %66)
%68 = load double, double* %10
%69 = load double, double* %14
%70 = call i32 @err_rel(double %68, double %69)
%71 = mul nsw i32 %70, 100
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), double %63, double %64, double %67, i32 %71)
%73 = load double, double* %11
%74 = load double, double* %15
%75 = load double, double* %11
%76 = load double, double* %15
%77 = call double @err_abs(double %75, double %76)
%78 = load double, double* %11
%79 = load double, double* %15
%80 = call i32 @err_rel(double %78, double %79)
%81 = mul nsw i32 %80, 100
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), double %73, double %74, double %77, i32 %81)
%83 = load double, double* %12
%84 = load double, double* %16
%85 = load double, double* %12
%86 = load double, double* %16
%87 = call double @err_abs(double %85, double %86)
%88 = load double, double* %12
%89 = load double, double* %16
%90 = call i32 @err_rel(double %88, double %89)
%91 = mul nsw i32 %90, 100
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0), double %83, double %84, double %87, i32 %91)
%93 = load double, double* %13
%94 = load double, double* %17
%95 = load double, double* %13
%96 = load double, double* %17
%97 = call double @err_abs(double %95, double %96)
%98 = load double, double* %13
%99 = load double, double* %17
%100 = call i32 @err_rel(double %98, double %99)
%101 = mul nsw i32 %100, 100
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0), double %93, double %94, double %97, i32 %101)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [48 x i8] c"x + y \09\09\09 %1.8f \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f %% \0A\00"
@.str.2 = [48 x i8] c"x * y \09\09\09 %1.8f \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f %% \0A\00"
@.str.3 = [48 x i8] c"x - u \09\09\09 %1.8f \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f %% \0A\00"
@.str.4 = [51 x i8] c"(x - u)/v \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f \09\09 %1.8f %% \0A\00"
@str = [64 x i8] c"Operaci\C3\B3n \09\09 Valoa a 8 \09\09 Arit. de M\C3\A1quina \09 Err Abs \09 Err R \00"
define i32 @main() {
%1 = tail call double @trun5(double 0x3FE6DB6DB48E678C)
%2 = tail call double @trun5(double 0x3FD5555551C112DA)
%3 = tail call double @trun5(double 7.142510e-01)
%4 = tail call double @trun5(double 0x40F81CDE66666666)
%5 = tail call double @trun8(double 0x3FF0C30C2EB7787C)
%6 = tail call double @trun8(double 0x3FCE79E7964B98CE)
%7 = tail call double @trun8(double 0x3F0232B284CD0000)
%8 = tail call double @trun8(double 0x400B6CE173808314)
%9 = fadd double %1, %2
%10 = tail call double @trun5(double %9)
%11 = fmul double %1, %2
%12 = tail call double @trun5(double %11)
%13 = fsub double %1, %3
%14 = tail call double @trun5(double %13)
%15 = fmul double %13, %4
%16 = tail call double @trun5(double %15)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%18 = tail call double @err_abs(double %5, double %10)
%19 = tail call i32 @err_rel(double %5, double %10)
%20 = mul nsw i32 %19, 100
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), double %5, double %10, double %18, i32 %20)
%22 = tail call double @err_abs(double %6, double %12)
%23 = tail call i32 @err_rel(double %6, double %12)
%24 = mul nsw i32 %23, 100
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), double %6, double %12, double %22, i32 %24)
%26 = tail call double @err_abs(double %7, double %14)
%27 = tail call i32 @err_rel(double %7, double %14)
%28 = mul nsw i32 %27, 100
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0), double %7, double %14, double %26, i32 %28)
%30 = tail call double @err_abs(double %8, double %16)
%31 = tail call i32 @err_rel(double %8, double %16)
%32 = mul nsw i32 %31, 100
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0), double %8, double %16, double %30, i32 %32)
ret i32 0
}