#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 /*<<< orphan*/ printf(char *, double, double, double, ...);
int main(int argc, char *argv[]) {
  double x = 1.0e-15;
  double y = 1.0L;
  double z = x + y;
  double zz = z - y;
  printf("x=%le y=%le z=%le zz=%le\n", x, y, z, zz);
  x = 1.0e-16;
  y = 1.0L;
  z = x + y;
  zz = z - y;
  printf("x=%le y=%le z=%le zz=%le\n", x, y, z, zz);
  double u = 1.0L;
  double v = 1.00000000000001L;
  double w = (v - u) * 100000000000000.0L;
  printf("u=%le v=%le w=%le\n", u, v, w);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0x3cd203af9ee75616,%rax
03 d2 3c
mov    %rax,-0x18(%rbp)
movabs $0x3ff0000000000000,%rax
mov    %rax,-0x60(%rbp)
mov    %rax,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
lea    0xe81(%rip),%rdi
mov    %rdi,-0x70(%rbp)
mov    $0x4,%al
mov    %al,-0x61(%rbp)
call   1030 <printf@plt>
mov    -0x70(%rbp),%rdi
mov    -0x60(%rbp),%rcx
mov    -0x61(%rbp),%al
movabs $0x3c9cd2b297d889bc,%rdx
d2 9c 3c
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
call   1030 <printf@plt>
mov    -0x60(%rbp),%rax
mov    %rax,-0x38(%rbp)
movabs $0x3ff000000000002d,%rax
mov    %rax,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
fldl   -0x50(%rbp)
fldl   0xddd(%rip)
fmulp  %st,%st(1)
fstpl  -0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
lea    0xdda(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf20(%rip),%rbx
movsd  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
movsd  0xee0(%rip),%xmm2
movsd  0xee0(%rip),%xmm3
mov    %rbx,%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movsd  0xed6(%rip),%xmm0
xorps  %xmm3,%xmm3
mov    %rbx,%rdi
movsd  0xeb0(%rip),%xmm1
movaps %xmm1,%xmm2
mov    $0x4,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
movsd  0xeb7(%rip),%xmm1
movsd  0xeb7(%rip),%xmm2
movsd  0xe87(%rip),%xmm0
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"x=%le y=%le z=%le zz=%le\0A\00"
@.str.1 = [19 x i8] c"u=%le v=%le w=%le\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e-15, double* %6
store double 1.000000e+00, double* %7
%13 = load double, double* %6
%14 = load double, double* %7
%15 = fadd double %13, %14
store double %15, double* %8
%16 = load double, double* %8
%17 = load double, double* %7
%18 = fsub double %16, %17
store double %18, double* %9
%19 = load double, double* %6
%20 = load double, double* %7
%21 = load double, double* %8
%22 = load double, double* %9
%23 = call i32 (i8*, double, double, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), double %19, double %20, double %21, double %22)
store double 0x3C9CD2B297D889BC, double* %6
store double 1.000000e+00, double* %7
%24 = load double, double* %6
%25 = load double, double* %7
%26 = fadd double %24, %25
store double %26, double* %8
%27 = load double, double* %8
%28 = load double, double* %7
%29 = fsub double %27, %28
store double %29, double* %9
%30 = load double, double* %6
%31 = load double, double* %7
%32 = load double, double* %8
%33 = load double, double* %9
%34 = call i32 (i8*, double, double, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), double %30, double %31, double %32, double %33)
store double 1.000000e+00, double* %10
store double 0x3FF000000000002D, double* %11
%35 = load double, double* %11
%36 = load double, double* %10
%37 = fsub double %35, %36
%38 = fpext double %37 to x86_fp80
%39 = fmul x86_fp80 %38, 0xK402DB5E620F480000000
%40 = fptrunc x86_fp80 %39 to double
store double %40, double* %12
%41 = load double, double* %10
%42 = load double, double* %11
%43 = load double, double* %12
%44 = call i32 (i8*, double, double, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), double %41, double %42, double %43)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"x=%le y=%le z=%le zz=%le\0A\00"
@.str.1 = [19 x i8] c"u=%le v=%le w=%le\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, double, double, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), double 1.000000e-15, double 1.000000e+00, double 0x3FF0000000000005, double 0x3CD4000000000000)
%4 = tail call i32 (i8*, double, double, double, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), double 0x3C9CD2B297D889BC, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%5 = tail call i32 (i8*, double, double, double, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, double 0x3FF000000000002D, double 0x3FEFF973CAFA8000)
ret i32 0
}