#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 *, ...);
int truncf(double);
main() {
  double x_8 = 0.71428571;
  double y_8 = 0.33333333;
  double x_5;
  double y_5;
  double u_5;
  double w_5;
  double v_5;
  double u_8 = 0.714251;
  double v_8 = 98765.9;
  double w_8 = 0.00001111;
  double suma, resta, absoluto, div, div2, suma2, relativo;
  printf("Ejercicio de Notas Aritmetica de Maquina\n");
  printf("Se imprimen los valores a 5\n");
  x_5 = truncf(x_8 * 1e5) * 1e-5;
  printf("Valor x a 5: %e\n", x_5);
  y_5 = truncf(y_8 * 1e5) * 1e-5;
  printf("Valor y a 5: %e\n", y_5);
  u_5 = truncf(u_8 * 1e5) * 1e-5;
  printf("Valor u a 5: %e\n", u_5);
  w_5 = truncf(w_8 * 1e5) * 1e-5;
  printf("Valor w a 5: %e\n", w_5);
  v_5 = truncf(v_8 / 100000 * 1e5) * 1e-5;
  printf("Valor v a 5: %e\n\n", v_5);
  printf("Ejercicio realizado en clase\n");
  printf("Operacion \t Valor a 8 \t Aritmetica de maquina \t \t ErrAbsoluto "
         "\t\t ErrRelativo \n");
  suma = (x_5 + y_5) / 10;
  suma = truncf(suma * 1e5) * 1e-5;
  absoluto = fabs(suma - (x_8 + y_8) / 10);
  relativo = absoluto / (fabs((x_8 + y_8)) / 10);
  printf("x+y \t \t %f \t \t %f \t \t %e \t \t %e \n", x_8 + y_8, suma,
         absoluto, relativo);
  printf("\nEjercicio de operaciones pares\n");
  resta = (x_5 - y_5);
  resta = truncf(resta * 1e5) * 1e-5;
  absoluto = fabs(resta - (x_8 - y_8));
  relativo = absoluto / fabs(x_8 - y_8);
  printf("Operacion \t Valor a 8 \t\t Aritmetica de maquina \t ErrAbsoluto \t "
         "\t ErrRelativo \n");
  printf("x-y \t \t %1.8f \t \t %f \t \t %e \t \t %e \n", x_8 - y_8, resta,
         absoluto, relativo);
  div = (x_5 / y_5) / 10;
  div = truncf(div * 1e5) * 1e-5;
  absoluto = fabs(div * 10 - (x_8 / y_8));
  relativo = absoluto / (fabs(x_8 / y_8));
  printf("x/y \t \t %1.8f \t \t %f \t \t %e \t \t %e \n", x_8 / y_8, div,
         absoluto, relativo);
  div2 = x_5 - u_5;
  div2 = truncf(div2 * 1e5) * 1e-5;
  div2 = truncf((div2 / w_5) * 1e5) * 1e-5;
  div2 = div2 / 10;
  absoluto = fabs(div2 * 10 - (x_8 - u_8) / w_8);
  relativo = absoluto / (fabs((x_8 - u_8) / w_8));
  printf("(x-u)/w \t %1.8f \t\t %f \t \t %e \t \t %e \n", ((x_8 - u_8) / w_8),
         div2, absoluto, relativo);
  suma2 = (u_5 / 100000) + v_5;
  suma2 = truncf(suma2 * 1e5) * 1e-5;
  absoluto = fabs(suma2 * 100000 - (u_8 + v_8));
  relativo = absoluto / (fabs(u_8 + v_8));
  printf("u+v \t\t %1.8f \t %f \t\t %e \t\t %e \n", u_8 + v_8, suma2 * 100000,
         absoluto, relativo);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  0xf05(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xe70(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe62(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xedc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe36(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe28(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xeb3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xdfc(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xdee(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe8a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xdc2(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xdb4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xe61(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x48(%rbp),%xmm0
movsd  0xd83(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd77(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xd6a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
lea    0xe28(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xd28(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd07(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xcf9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xce1(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0xd02(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
movaps 0xce3(%rip),%xmm2
pand   %xmm2,%xmm1
movsd  0xca7(%rip),%xmm2
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
lea    0xdbe(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xc38(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xc2a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
subsd  %xmm1,%xmm0
movaps 0xc3f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movaps 0xc20(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
lea    0xd66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
lea    0xd8b(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  0xb96(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xb75(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xb67(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xb38(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movaps 0xb59(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
movaps 0xb3a(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
lea    0xcd8(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xaa9(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xa9b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  0xa78(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0xa6b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  0xa5d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x40(%rbp),%xmm1
divsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xa21(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movaps 0xa42(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x40(%rbp),%xmm1
divsd  -0x50(%rbp),%xmm1
movaps 0xa1e(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
lea    0xbdc(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  -0x28(%rbp),%xmm0
movsd  0x992(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0x97c(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
call   1040 <truncf@plt>
cvtsi2sd %eax,%xmm0
movsd  0x96e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
addsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0x92f(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movaps 0x960(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
addsd  -0x48(%rbp),%xmm1
movaps 0x941(%rip),%xmm2
pand   %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  0x8df(%rip),%xmm1
mulsd  -0x80(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm3
ff
lea    0xb22(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
lea    0x107d(%rip),%rdi
call   1030 <puts@plt>
lea    0x109a(%rip),%rdi
call   1030 <puts@plt>
movsd  0xeac(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xea0(%rip),%xmm0
movsd  %xmm0,(%rsp)
lea    0xf3c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe8d(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe71(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xf1d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe65(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe41(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0xefe(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe3d(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe11(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
lea    0xedf(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0xe15(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xde1(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xfbb(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcc(%rip),%rdi
call   1030 <puts@plt>
movsd  (%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0xdca(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xdc6(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xd82(%rip),%xmm1
movsd  0xdb2(%rip),%xmm2
addsd  %xmm1,%xmm2
andpd  0xe06(%rip),%xmm2
movapd %xmm2,%xmm3
divsd  0xda2(%rip),%xmm3
lea    0xe59(%rip),%rdi
movsd  0xd9b(%rip),%xmm0
mov    $0x4,%al
call   1040 <printf@plt>
lea    0xfa5(%rip),%rdi
call   1030 <puts@plt>
movsd  (%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
mulsd  0xd5d(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xd19(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0xd5b(%rip),%xmm1
addsd  %xmm0,%xmm1
andpd  0xd97(%rip),%xmm1
movapd %xmm1,0x40(%rsp)
divsd  0xd49(%rip),%xmm1
movapd %xmm1,0x30(%rsp)
lea    0xf64(%rip),%rdi
call   1030 <puts@plt>
lea    0xdf8(%rip),%rdi
movsd  0xd28(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
movaps 0x40(%rsp),%xmm2
movaps 0x30(%rsp),%xmm3
mov    $0x4,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
movsd  0xcce(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0xcca(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xc86(%rip),%xmm1
movapd %xmm1,%xmm2
movsd  0xca2(%rip),%xmm0
mulsd  %xmm0,%xmm2
addsd  0xcce(%rip),%xmm2
andpd  0xcfe(%rip),%xmm2
movsd  0xcc6(%rip),%xmm0
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
lea    0xd94(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
mulsd  0xc65(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xc21(%rip),%xmm0
divsd  0x20(%rsp),%xmm0
mulsd  0xc43(%rip),%xmm0
call   1050 <truncf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xbff(%rip),%xmm1
movsd  0xc1f(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm2
addsd  0xc57(%rip),%xmm2
andpd  0xc77(%rip),%xmm2
movsd  0xc4f(%rip),%xmm0
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
lea    0xd32(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0xbe3(%rip),%xmm1
divsd  %xmm1,%xmm0
addsd  0x28(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <truncf@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0xb91(%rip),%xmm1
mulsd  0xbb9(%rip),%xmm1
movsd  0xc01(%rip),%xmm2
addsd  %xmm1,%xmm2
andpd  0xc0d(%rip),%xmm2
movsd  0xbf5(%rip),%xmm0
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
lea    0xcee(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Ejercicio de Notas Aritmetica de Maquina\0A\00"
@.str.1 = [29 x i8] c"Se imprimen los valores a 5\0A\00"
@.str.2 = [17 x i8] c"Valor x a 5: %e\0A\00"
@.str.3 = [17 x i8] c"Valor y a 5: %e\0A\00"
@.str.4 = [17 x i8] c"Valor u a 5: %e\0A\00"
@.str.5 = [17 x i8] c"Valor w a 5: %e\0A\00"
@.str.6 = [18 x i8] c"Valor v a 5: %e\0A\0A\00"
@.str.7 = [30 x i8] c"Ejercicio realizado en clase\0A\00"
@.str.8 = [79 x i8] c"Operacion \09 Valor a 8 \09 Aritmetica de maquina \09 \09 ErrAbsoluto \09\09 ErrRelativo \0A\00"
@.str.9 = [34 x i8] c"x+y \09 \09 %f \09 \09 %f \09 \09 %e \09 \09 %e \0A\00"
@.str.10 = [33 x i8] c"\0AEjercicio de operaciones pares\0A\00"
@.str.11 = [79 x i8] c"Operacion \09 Valor a 8 \09\09 Aritmetica de maquina \09 ErrAbsoluto \09 \09 ErrRelativo \0A\00"
@.str.12 = [37 x i8] c"x-y \09 \09 %1.8f \09 \09 %f \09 \09 %e \09 \09 %e \0A\00"
@.str.13 = [37 x i8] c"x/y \09 \09 %1.8f \09 \09 %f \09 \09 %e \09 \09 %e \0A\00"
@.str.14 = [38 x i8] c"(x-u)/w \09 %1.8f \09\09 %f \09 \09 %e \09 \09 %e \0A\00"
@.str.15 = [32 x i8] c"u+v \09\09 %1.8f \09 %f \09\09 %e \09\09 %e \0A\00"
define i32 @main() {
%1 = alloca double
%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 double 0x3FE6DB6DB48E678C, double* %1
store double 0x3FD5555551C112DA, double* %2
store double 7.142510e-01, double* %8
store double 0x40F81CDE66666666, double* %9
store double 1.111000e-05, double* %10
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%20 = load double, double* %1
%21 = fmul double %20, 1.000000e+05
%22 = call i32 @truncf(double %21)
%23 = sitofp i32 %22 to double
%24 = fmul double %23, 1.000000e-05
store double %24, double* %3
%25 = load double, double* %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %25)
%27 = load double, double* %2
%28 = fmul double %27, 1.000000e+05
%29 = call i32 @truncf(double %28)
%30 = sitofp i32 %29 to double
%31 = fmul double %30, 1.000000e-05
store double %31, double* %4
%32 = load double, double* %4
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %32)
%34 = load double, double* %8
%35 = fmul double %34, 1.000000e+05
%36 = call i32 @truncf(double %35)
%37 = sitofp i32 %36 to double
%38 = fmul double %37, 1.000000e-05
store double %38, double* %5
%39 = load double, double* %5
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %39)
%41 = load double, double* %10
%42 = fmul double %41, 1.000000e+05
%43 = call i32 @truncf(double %42)
%44 = sitofp i32 %43 to double
%45 = fmul double %44, 1.000000e-05
store double %45, double* %6
%46 = load double, double* %6
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), double %46)
%48 = load double, double* %9
%49 = fdiv double %48, 1.000000e+05
%50 = fmul double %49, 1.000000e+05
%51 = call i32 @truncf(double %50)
%52 = sitofp i32 %51 to double
%53 = fmul double %52, 1.000000e-05
store double %53, double* %7
%54 = load double, double* %7
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), double %54)
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.8, i64 0, i64 0))
%58 = load double, double* %3
%59 = load double, double* %4
%60 = fadd double %58, %59
%61 = fdiv double %60, 1.000000e+01
store double %61, double* %11
%62 = load double, double* %11
%63 = fmul double %62, 1.000000e+05
%64 = call i32 @truncf(double %63)
%65 = sitofp i32 %64 to double
%66 = fmul double %65, 1.000000e-05
store double %66, double* %11
%67 = load double, double* %11
%68 = load double, double* %1
%69 = load double, double* %2
%70 = fadd double %68, %69
%71 = fdiv double %70, 1.000000e+01
%72 = fsub double %67, %71
%73 = call double @llvm.fabs.f64(double %72)
store double %73, double* %13
%74 = load double, double* %13
%75 = load double, double* %1
%76 = load double, double* %2
%77 = fadd double %75, %76
%78 = call double @llvm.fabs.f64(double %77)
%79 = fdiv double %78, 1.000000e+01
%80 = fdiv double %74, %79
store double %80, double* %17
%81 = load double, double* %1
%82 = load double, double* %2
%83 = fadd double %81, %82
%84 = load double, double* %11
%85 = load double, double* %13
%86 = load double, double* %17
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), double %83, double %84, double %85, double %86)
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0))
%89 = load double, double* %3
%90 = load double, double* %4
%91 = fsub double %89, %90
store double %91, double* %12
%92 = load double, double* %12
%93 = fmul double %92, 1.000000e+05
%94 = call i32 @truncf(double %93)
%95 = sitofp i32 %94 to double
%96 = fmul double %95, 1.000000e-05
store double %96, double* %12
%97 = load double, double* %12
%98 = load double, double* %1
%99 = load double, double* %2
%100 = fsub double %98, %99
%101 = fsub double %97, %100
%102 = call double @llvm.fabs.f64(double %101)
store double %102, double* %13
%103 = load double, double* %13
%104 = load double, double* %1
%105 = load double, double* %2
%106 = fsub double %104, %105
%107 = call double @llvm.fabs.f64(double %106)
%108 = fdiv double %103, %107
store double %108, double* %17
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.11, i64 0, i64 0))
%110 = load double, double* %1
%111 = load double, double* %2
%112 = fsub double %110, %111
%113 = load double, double* %12
%114 = load double, double* %13
%115 = load double, double* %17
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0), double %112, double %113, double %114, double %115)
%117 = load double, double* %3
%118 = load double, double* %4
%119 = fdiv double %117, %118
%120 = fdiv double %119, 1.000000e+01
store double %120, double* %14
%121 = load double, double* %14
%122 = fmul double %121, 1.000000e+05
%123 = call i32 @truncf(double %122)
%124 = sitofp i32 %123 to double
%125 = fmul double %124, 1.000000e-05
store double %125, double* %14
%126 = load double, double* %14
%127 = load double, double* %1
%128 = load double, double* %2
%129 = fdiv double %127, %128
%130 = fneg double %129
%131 = call double @llvm.fmuladd.f64(double %126, double 1.000000e+01, double %130)
%132 = call double @llvm.fabs.f64(double %131)
store double %132, double* %13
%133 = load double, double* %13
%134 = load double, double* %1
%135 = load double, double* %2
%136 = fdiv double %134, %135
%137 = call double @llvm.fabs.f64(double %136)
%138 = fdiv double %133, %137
store double %138, double* %17
%139 = load double, double* %1
%140 = load double, double* %2
%141 = fdiv double %139, %140
%142 = load double, double* %14
%143 = load double, double* %13
%144 = load double, double* %17
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.13, i64 0, i64 0), double %141, double %142, double %143, double %144)
%146 = load double, double* %3
%147 = load double, double* %5
%148 = fsub double %146, %147
store double %148, double* %15
%149 = load double, double* %15
%150 = fmul double %149, 1.000000e+05
%151 = call i32 @truncf(double %150)
%152 = sitofp i32 %151 to double
%153 = fmul double %152, 1.000000e-05
store double %153, double* %15
%154 = load double, double* %15
%155 = load double, double* %6
%156 = fdiv double %154, %155
%157 = fmul double %156, 1.000000e+05
%158 = call i32 @truncf(double %157)
%159 = sitofp i32 %158 to double
%160 = fmul double %159, 1.000000e-05
store double %160, double* %15
%161 = load double, double* %15
%162 = fdiv double %161, 1.000000e+01
store double %162, double* %15
%163 = load double, double* %15
%164 = load double, double* %1
%165 = load double, double* %8
%166 = fsub double %164, %165
%167 = load double, double* %10
%168 = fdiv double %166, %167
%169 = fneg double %168
%170 = call double @llvm.fmuladd.f64(double %163, double 1.000000e+01, double %169)
%171 = call double @llvm.fabs.f64(double %170)
store double %171, double* %13
%172 = load double, double* %13
%173 = load double, double* %1
%174 = load double, double* %8
%175 = fsub double %173, %174
%176 = load double, double* %10
%177 = fdiv double %175, %176
%178 = call double @llvm.fabs.f64(double %177)
%179 = fdiv double %172, %178
store double %179, double* %17
%180 = load double, double* %1
%181 = load double, double* %8
%182 = fsub double %180, %181
%183 = load double, double* %10
%184 = fdiv double %182, %183
%185 = load double, double* %15
%186 = load double, double* %13
%187 = load double, double* %17
%188 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0), double %184, double %185, double %186, double %187)
%189 = load double, double* %5
%190 = fdiv double %189, 1.000000e+05
%191 = load double, double* %7
%192 = fadd double %190, %191
store double %192, double* %16
%193 = load double, double* %16
%194 = fmul double %193, 1.000000e+05
%195 = call i32 @truncf(double %194)
%196 = sitofp i32 %195 to double
%197 = fmul double %196, 1.000000e-05
store double %197, double* %16
%198 = load double, double* %16
%199 = load double, double* %8
%200 = load double, double* %9
%201 = fadd double %199, %200
%202 = fneg double %201
%203 = call double @llvm.fmuladd.f64(double %198, double 1.000000e+05, double %202)
%204 = call double @llvm.fabs.f64(double %203)
store double %204, double* %13
%205 = load double, double* %13
%206 = load double, double* %8
%207 = load double, double* %9
%208 = fadd double %206, %207
%209 = call double @llvm.fabs.f64(double %208)
%210 = fdiv double %205, %209
store double %210, double* %17
%211 = load double, double* %8
%212 = load double, double* %9
%213 = fadd double %211, %212
%214 = load double, double* %16
%215 = fmul double %214, 1.000000e+05
%216 = load double, double* %13
%217 = load double, double* %17
%218 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), double %213, double %215, double %216, double %217)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [17 x i8] c"Valor x a 5: %e\0A\00"
@.str.3 = [17 x i8] c"Valor y a 5: %e\0A\00"
@.str.4 = [17 x i8] c"Valor u a 5: %e\0A\00"
@.str.5 = [17 x i8] c"Valor w a 5: %e\0A\00"
@.str.6 = [18 x i8] c"Valor v a 5: %e\0A\0A\00"
@.str.9 = [34 x i8] c"x+y \09 \09 %f \09 \09 %f \09 \09 %e \09 \09 %e \0A\00"
@.str.12 = [37 x i8] c"x-y \09 \09 %1.8f \09 \09 %f \09 \09 %e \09 \09 %e \0A\00"
@.str.13 = [37 x i8] c"x/y \09 \09 %1.8f \09 \09 %f \09 \09 %e \09 \09 %e \0A\00"
@.str.14 = [38 x i8] c"(x-u)/w \09 %1.8f \09\09 %f \09 \09 %e \09 \09 %e \0A\00"
@.str.15 = [32 x i8] c"u+v \09\09 %1.8f \09 %f \09\09 %e \09\09 %e \0A\00"
@str = [41 x i8] c"Ejercicio de Notas Aritmetica de Maquina\00"
@str.16 = [28 x i8] c"Se imprimen los valores a 5\00"
@str.17 = [29 x i8] c"Ejercicio realizado en clase\00"
@str.18 = [78 x i8] c"Operacion \09 Valor a 8 \09 Aritmetica de maquina \09 \09 ErrAbsoluto \09\09 ErrRelativo \00"
@str.19 = [32 x i8] c"\0AEjercicio de operaciones pares\00"
@str.20 = [78 x i8] c"Operacion \09 Valor a 8 \09\09 Aritmetica de maquina \09 ErrAbsoluto \09 \09 ErrRelativo \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.16, i64 0, i64 0))
%3 = tail call i32 @truncf(double 0x40F1704922D0E560)
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 1.000000e-05
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %5)
%7 = tail call i32 @truncf(double 0x40E046AAA7EF9DB2)
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 1.000000e-05
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %9)
%11 = tail call i32 @truncf(double 0x40F1701199999999)
%12 = sitofp i32 %11 to double
%13 = fmul double %12, 1.000000e-05
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %13)
%15 = tail call i32 @truncf(double 1.111000e+00)
%16 = sitofp i32 %15 to double
%17 = fmul double %16, 1.000000e-05
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), double %17)
%19 = tail call i32 @truncf(double 0x40F81CDE66666666)
%20 = sitofp i32 %19 to double
%21 = fmul double %20, 1.000000e-05
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), double %21)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.17, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.18, i64 0, i64 0))
%25 = fadd double %5, %9
%26 = fdiv double %25, 1.000000e+01
%27 = fmul double %26, 1.000000e+05
%28 = tail call i32 @truncf(double %27)
%29 = sitofp i32 %28 to double
%30 = fmul double %29, 1.000000e-05
%31 = fadd double %30, 0xBFBAD1AD178BF3FA
%32 = tail call double @llvm.fabs.f64(double %31)
%33 = fdiv double %32, 0x3FBAD1AD178BF3FA
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), double 0x3FF0C30C2EB7787C, double %30, double %32, double %33)
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.19, i64 0, i64 0))
%36 = fsub double %5, %9
%37 = fmul double %36, 1.000000e+05
%38 = tail call i32 @truncf(double %37)
%39 = sitofp i32 %38 to double
%40 = fmul double %39, 1.000000e-05
%41 = fadd double %40, 0xBFD86186175BBC3E
%42 = tail call double @llvm.fabs.f64(double %41)
%43 = fdiv double %42, 0x3FD86186175BBC3E
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.20, i64 0, i64 0))
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0), double 0x3FD86186175BBC3E, double %40, double %42, double %43)
%46 = fdiv double %5, %9
%47 = fdiv double %46, 1.000000e+01
%48 = fmul double %47, 1.000000e+05
%49 = tail call i32 @truncf(double %48)
%50 = sitofp i32 %49 to double
%51 = fmul double %50, 1.000000e-05
%52 = tail call double @llvm.fmuladd.f64(double %51, double 1.000000e+01, double 0xC00124924A4B155F)
%53 = tail call double @llvm.fabs.f64(double %52)
%54 = fdiv double %53, 0x400124924A4B155F
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.13, i64 0, i64 0), double 0x400124924A4B155F, double %51, double %53, double %54)
%56 = fsub double %5, %13
%57 = fmul double %56, 1.000000e+05
%58 = tail call i32 @truncf(double %57)
%59 = sitofp i32 %58 to double
%60 = fmul double %59, 1.000000e-05
%61 = fdiv double %60, %17
%62 = fmul double %61, 1.000000e+05
%63 = tail call i32 @truncf(double %62)
%64 = sitofp i32 %63 to double
%65 = fmul double %64, 1.000000e-05
%66 = fdiv double %65, 1.000000e+01
%67 = tail call double @llvm.fmuladd.f64(double %66, double 1.000000e+01, double 0xC008FE6314F7EA26)
%68 = tail call double @llvm.fabs.f64(double %67)
%69 = fdiv double %68, 0x4008FE6314F7EA26
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0), double 0x4008FE6314F7EA26, double %66, double %68, double %69)
%71 = fdiv double %13, 1.000000e+05
%72 = fadd double %71, %21
%73 = fmul double %72, 1.000000e+05
%74 = tail call i32 @truncf(double %73)
%75 = sitofp i32 %74 to double
%76 = fmul double %75, 1.000000e-05
%77 = tail call double @llvm.fmuladd.f64(double %76, double 1.000000e+05, double 0xC0F81CE9D3F8DB48)
%78 = tail call double @llvm.fabs.f64(double %77)
%79 = fdiv double %78, 0x40F81CE9D3F8DB48
%80 = fmul double %76, 1.000000e+05
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), double 0x40F81CE9D3F8DB48, double %80, double %78, double %79)
ret i32 0
}