#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 */
float powf(float, int);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  float S = 0, k = 0;
  int N;
  scanf("%d", &N);
  while (k <= N) {
    S += powf(-1, k) * ((k * k - k + 1) / (powf(k, 4) + k + 10));
    k++;
  }
  printf("%f\n", S);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xeb6(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0xc(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1218 <main+0xe8>
cvttss2si -0xc(%rbp),%edi
movss  0xe89(%rip),%xmm0
call   1030 <powf@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe4b(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
mov    $0x4,%edi
call   1030 <powf@plt>
movss  -0x18(%rbp),%xmm2
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
addss  -0xc(%rbp),%xmm1
movss  0xe1d(%rip),%xmm3
addss  %xmm3,%xmm1
divss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xdf7(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    115f <main+0x2f>
movss  -0x8(%rbp),%xmm0
lea    0xdeb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed1(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
js     120d <main+0xdd>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
movss  %xmm0,0x4(%rsp)
movss  %xmm1,0x14(%rsp)
cvttss2si %xmm0,%edi
movss  0xe88(%rip),%xmm0
call   1030 <powf@plt>
movss  %xmm0,0x10(%rsp)
movss  0x4(%rsp),%xmm1
mulss  %xmm1,%xmm1
subss  0x4(%rsp),%xmm1
movss  0xe69(%rip),%xmm0
addss  %xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
movss  0x4(%rsp),%xmm0
mov    $0x4,%edi
call   1030 <powf@plt>
movss  0x14(%rsp),%xmm1
addss  0x4(%rsp),%xmm0
addss  0xe3f(%rip),%xmm0
movss  0xc(%rsp),%xmm2
divss  %xmm0,%xmm2
mulss  0x10(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2ssl 0x8(%rsp),%xmm0
addss  %xmm2,%xmm1
movss  0x4(%rsp),%xmm2
addss  0xe10(%rip),%xmm2
movss  %xmm2,0x4(%rsp)
ucomiss 0x4(%rsp),%xmm0
movss  0x4(%rsp),%xmm0
jae    1160 <main+0x30>
jmp    1210 <main+0xe0>
xorps  %xmm1,%xmm1
lea    0xdf8(%rip),%rdi
movaps %xmm1,%xmm0
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store i32 0, i32* %1
store float 0.000000e+00, float* %2
store float 0.000000e+00, float* %3
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
br label %6
6: ; preds = %11, %0
%7 = load float, float* %3
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to float
%10 = fcmp ole float %7, %9
br i1 %10, label %11, label %31
11: ; preds = %6
%12 = load float, float* %3
%13 = fptosi float %12 to i32
%14 = call float @powf(float -1.000000e+00, i32 %13)
%15 = load float, float* %3
%16 = load float, float* %3
%17 = load float, float* %3
%18 = fneg float %17
%19 = call float @llvm.fmuladd.f32(float %15, float %16, float %18)
%20 = fadd float %19, 1.000000e+00
%21 = load float, float* %3
%22 = call float @powf(float %21, i32 4)
%23 = load float, float* %3
%24 = fadd float %22, %23
%25 = fadd float %24, 1.000000e+01
%26 = fdiv float %20, %25
%27 = load float, float* %2
%28 = call float @llvm.fmuladd.f32(float %14, float %26, float %27)
store float %28, float* %2
%29 = load float, float* %3
%30 = fadd float %29, 1.000000e+00
store float %30, float* %3
br label %6
31: ; preds = %6
%32 = load float, float* %2
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 0
br i1 %5, label %23, label %6
6: ; preds = %0, %6
%7 = phi float [ %19, %6 ], [ 0.000000e+00, %0 ]
%8 = phi float [ %18, %6 ], [ 0.000000e+00, %0 ]
%9 = fptosi float %7 to i32
%10 = call float @powf(float -1.000000e+00, i32 %9)
%11 = fneg float %7
%12 = call float @llvm.fmuladd.f32(float %7, float %7, float %11)
%13 = fadd float %12, 1.000000e+00
%14 = call float @powf(float %7, i32 4)
%15 = fadd float %7, %14
%16 = fadd float %15, 1.000000e+01
%17 = fdiv float %13, %16
%18 = call float @llvm.fmuladd.f32(float %10, float %17, float %8)
%19 = fadd float %7, 1.000000e+00
%20 = load i32, i32* %1
%21 = sitofp i32 %20 to float
%22 = fcmp ugt float %19, %21
br i1 %22, label %23, label %6
23: ; preds = %6, %0
%24 = phi float [ 0.000000e+00, %0 ], [ %18, %6 ]
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %24)
ret i32 0
}