#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);
int /*<<< orphan*/ scanf(char *, double *);
main() {
  double ser[1000];
  int i;
  for (i = 0; i < 1000; ++i) {
    ser[i] = 0;
  }
  scanf("%lf", &ser[1]);
  for (i = 1; i < 1000 - 1; ++i) {
    ser[i + 1] = (ser[i] / (1 - (ser[i] - (int)ser[i])));
  }
  for (i = 1; i <= 1000 - 1; ++i) {
    printf("%lf ", ser[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1f54(%rbp)
cmpl   $0x3e8,-0x1f54(%rbp)
jge    1173 <main+0x53>
movslq -0x1f54(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x1f50(%rbp,%rax,8)
ff ff
mov    -0x1f54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f54(%rbp)
jmp    113c <main+0x1c>
lea    -0x1f50(%rbp),%rsi
add    $0x8,%rsi
lea    0xe83(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x1,-0x1f54(%rbp)
cmpl   $0x3e7,-0x1f54(%rbp)
jge    1214 <main+0xf4>
movslq -0x1f54(%rbp),%rax
movsd  -0x1f50(%rbp,%rax,8),%xmm0
ff ff
movslq -0x1f54(%rbp),%rax
movsd  -0x1f50(%rbp,%rax,8),%xmm2
ff ff
movslq -0x1f54(%rbp),%rax
cvttsd2si -0x1f50(%rbp,%rax,8),%eax
ff ff
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm2
movsd  0xe1c(%rip),%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x1f54(%rbp),%eax
add    $0x1,%eax
cltq
movsd  %xmm0,-0x1f50(%rbp,%rax,8)
ff ff
mov    -0x1f54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f54(%rbp)
jmp    1194 <main+0x74>
movl   $0x1,-0x1f54(%rbp)
cmpl   $0x3e7,-0x1f54(%rbp)
jg     125e <main+0x13e>
movslq -0x1f54(%rbp),%rax
movsd  -0x1f50(%rbp,%rax,8),%xmm0
ff ff
lea    0xdc7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1f54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f54(%rbp)
jmp    121e <main+0xfe>
mov    -0x4(%rbp),%eax
add    $0x1f60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1f48,%rsp
mov    %rsp,%rdi
mov    $0x1f40,%edx
xor    %esi,%esi
call   1040 <memset@plt>
lea    0x8(%rsp),%rsi
lea    0xeb3(%rip),%rdi
call   1050 <scanf@plt>
mov    $0x3,%eax
movsd  0x8(%rsp),%xmm0
movsd  0xe93(%rip),%xmm1
movapd %xmm0,%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cvttpd2dq %xmm2,%xmm3
cvtdq2pd %xmm3,%xmm3
subsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
divsd  %xmm3,%xmm2
movsd  %xmm2,-0x8(%rsp,%rax,8)
cvttpd2dq %xmm2,%xmm3
cvtdq2pd %xmm3,%xmm3
subsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
divsd  %xmm3,%xmm2
movsd  %xmm2,(%rsp,%rax,8)
add    $0x2,%rax
cmp    $0x3e9,%rax
jne    1180 <main+0x50>
lea    0xe46(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rsp,%rbx,8),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x3e8,%rbx
jne    11e0 <main+0xb0>
xor    %eax,%eax
add    $0x1f48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [5 x i8] c"%lf \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x double]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 0, i64 %9
store double 0.000000e+00, double* %10
br label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 0, i64 1
%16 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %15)
store i32 1, i32* %3
br label %17
17: ; preds = %42, %14
%18 = load i32, i32* %3
%19 = icmp slt i32 %18, 999
br i1 %19, label %20, label %45
20: ; preds = %17
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 0, i64 %22
%24 = load double, double* %23
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 0, i64 %26
%28 = load double, double* %27
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 0, i64 %30
%32 = load double, double* %31
%33 = fptosi double %32 to i32
%34 = sitofp i32 %33 to double
%35 = fsub double %28, %34
%36 = fsub double 1.000000e+00, %35
%37 = fdiv double %24, %36
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 0, i64 %40
store double %37, double* %41
br label %42
42: ; preds = %20
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %17
45: ; preds = %17
store i32 1, i32* %3
br label %46
46: ; preds = %55, %45
%47 = load i32, i32* %3
%48 = icmp sle i32 %47, 999
br i1 %48, label %49, label %58
49: ; preds = %46
%50 = load i32, i32* %3
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 0, i64 %51
%53 = load double, double* %52
%54 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %53)
br label %55
55: ; preds = %49
%56 = load i32, i32* %3
%57 = add nsw i32 %56, 1
store i32 %57, i32* %3
br label %46
58: ; preds = %46
%59 = load i32, i32* %1
ret i32 %59
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [5 x i8] c"%lf \00"
define i32 @main() {
%1 = alloca [1000 x double]
%2 = bitcast [1000 x double]* %1 to i8*
%3 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 1
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%5 = load double, double* %3
br label %6
6: ; preds = %6, %0
%7 = phi double [ %5, %0 ], [ %20, %6 ]
%8 = phi i64 [ 1, %0 ], [ %21, %6 ]
%9 = fptosi double %7 to i32
%10 = sitofp i32 %9 to double
%11 = fsub double %10, %7
%12 = fadd double %11, 1.000000e+00
%13 = fdiv double %7, %12
%14 = add nuw nsw i64 %8, 1
%15 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %14
store double %13, double* %15
%16 = fptosi double %13 to i32
%17 = sitofp i32 %16 to double
%18 = fsub double %17, %13
%19 = fadd double %18, 1.000000e+00
%20 = fdiv double %13, %19
%21 = add nuw nsw i64 %8, 2
%22 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %21
store double %20, double* %22
%23 = icmp eq i64 %21, 999
br i1 %23, label %24, label %6
24: ; preds = %6
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %5)
br label %26
26: ; preds = %24, %26
%27 = phi i64 [ 2, %24 ], [ %31, %26 ]
%28 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 %27
%29 = load double, double* %28
%30 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %29)
%31 = add nuw nsw i64 %27, 1
%32 = icmp eq i64 %31, 1000
br i1 %32, label %33, label %26
33: ; preds = %26
ret i32 0
}