double wolf_serie(double x) {
  int n;
  double accumulator = 0, productory = 1;
  int sign = 1;
  for (n = 0; n <= 8; n++) {
    sign = pow(-1, n);
    productory = rising_fact(-0.5, n);
    double pot = pow((x - 1), n);
    long denominator = fact(n);
    double slice = (sign * productory * pot) / denominator;
    printf("Slice %d: %lf <=> (%d * %lf * %.2lf) / %li\n", n, slice, sign,
           productory, pot, denominator);
    accumulator += slice;
  }
  return accumulator;
}


x86 assembly (clang, -O0):
<wolf_serie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xea3(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jg     1240 <wolf_serie+0x100>
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xe89(%rip),%xmm0
call   1050 <pow@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%edi
movsd  0xe6a(%rip),%xmm0
mov    $0x1,%al
call   1060 <rising_fact@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe45(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1040 <fact@plt>
cltq
mov    %rax,-0x38(%rbp)
cvtsi2sdl -0x24(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvtsi2sdq -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0xc(%rbp),%esi
movsd  -0x40(%rbp),%xmm0
mov    -0x24(%rbp),%edx
movsd  -0x20(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
mov    -0x38(%rbp),%rcx
lea    0xdfc(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movsd  -0x40(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1170 <wolf_serie+0x30>
movsd  -0x18(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wolf_serie>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
addsd  0xeb0(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
xorpd  %xmm1,%xmm1
lea    0xeb7(%rip),%r14
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,0x38(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  0xe7c(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <pow@plt>
movapd %xmm0,0x10(%rsp)
cvttsd2si %xmm0,%ebx
movsd  0xe67(%rip),%xmm0
mov    %ebp,%edi
mov    $0x1,%al
call   1060 <rising_fact@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <pow@plt>
movsd  %xmm0,0x28(%rsp)
mov    %ebp,%edi
xor    %eax,%eax
call   1040 <fact@plt>
cvttpd2dq 0x10(%rsp),%xmm0
movslq %eax,%rcx
cvtdq2pd %xmm0,%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x28(%rsp),%xmm2
mulsd  %xmm2,%xmm0
xorps  %xmm3,%xmm3
cvtsi2sd %ecx,%xmm3
divsd  %xmm3,%xmm0
movapd %xmm0,0x10(%rsp)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x3,%al
call   1030 <printf@plt>
movsd  0x38(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  0x10(%rsp),%xmm0
addsd  0xddf(%rip),%xmm1
add    $0x1,%ebp
cmp    $0x9,%ebp
jne    1170 <wolf_serie+0x30>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Slice %d: %lf <=> (%d * %lf * %.2lf) / %li\0A\00"
define double @wolf_serie(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca double
%8 = alloca i64
%9 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %4
store double 1.000000e+00, double* %5
store i32 1, i32* %6
store i32 0, i32* %3
br label %10
10: ; preds = %48, %1
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 8
br i1 %12, label %13, label %51
13: ; preds = %10
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to double
%16 = call double @pow(double -1.000000e+00, double %15)
%17 = fptosi double %16 to i32
store i32 %17, i32* %6
%18 = load i32, i32* %3
%19 = call i32 (double, i32, ...) bitcast (i32 (...)* @rising_fact to i32 (double, i32, ...)*)(double -5.000000e-01, i32 %18)
%20 = sitofp i32 %19 to double
store double %20, double* %5
%21 = load double, double* %2
%22 = fsub double %21, 1.000000e+00
%23 = load i32, i32* %3
%24 = sitofp i32 %23 to double
%25 = call double @pow(double %22, double %24)
store double %25, double* %7
%26 = load i32, i32* %3
%27 = call i32 (i32, ...) bitcast (i32 (...)* @fact to i32 (i32, ...)*)(i32 %26)
%28 = sext i32 %27 to i64
store i64 %28, i64* %8
%29 = load i32, i32* %6
%30 = sitofp i32 %29 to double
%31 = load double, double* %5
%32 = fmul double %30, %31
%33 = load double, double* %7
%34 = fmul double %32, %33
%35 = load i64, i64* %8
%36 = sitofp i64 %35 to double
%37 = fdiv double %34, %36
store double %37, double* %9
%38 = load i32, i32* %3
%39 = load double, double* %9
%40 = load i32, i32* %6
%41 = load double, double* %5
%42 = load double, double* %7
%43 = load i64, i64* %8
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %38, double %39, i32 %40, double %41, double %42, i64 %43)
%45 = load double, double* %9
%46 = load double, double* %4
%47 = fadd double %46, %45
store double %47, double* %4
br label %48
48: ; preds = %13
%49 = load i32, i32* %3
%50 = add nsw i32 %49, 1
store i32 %50, i32* %3
br label %10
51: ; preds = %10
%52 = load double, double* %4
ret double %52
}

LLVM IR (-O2):
@.str = [44 x i8] c"Slice %d: %lf <=> (%d * %lf * %.2lf) / %li\0A\00"
define double @wolf_serie(double %0) {
%2 = fadd double %0, -1.000000e+00
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %21, %3 ]
%5 = phi double [ 0.000000e+00, %1 ], [ %20, %3 ]
%6 = sitofp i32 %4 to double
%7 = tail call double @pow(double -1.000000e+00, double %6)
%8 = fptosi double %7 to i32
%9 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @rising_fact to i32 (double, i32, ...)*)(double -5.000000e-01, i32 %4)
%10 = sitofp i32 %9 to double
%11 = tail call double @pow(double %2, double %6)
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @fact to i32 (i32, ...)*)(i32 %4)
%13 = sext i32 %12 to i64
%14 = sitofp i32 %8 to double
%15 = fmul double %14, %10
%16 = fmul double %11, %15
%17 = sitofp i32 %12 to double
%18 = fdiv double %16, %17
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %4, double %18, i32 %8, double %10, double %11, i64 %13)
%20 = fadd double %5, %18
%21 = add nuw nsw i32 %4, 1
%22 = icmp eq i32 %21, 9
br i1 %22, label %23, label %3
23: ; preds = %3
ret double %20
}