#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 scanf(char *, double *, double *);
double sin(int);
int main() {
  double r, n;
  while (scanf("%lf %lf", &r, &n) == 2) {
    printf("%.3lf\n",
           0.5 * r * sin(2 * 3.1415926535897932384626433832795 / n) * r * n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    11ab <main+0x7b>
movsd  0xea4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe8a(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xece(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    11c6 <main+0x96>
lea    0xebd(%rip),%r14
lea    0xeae(%rip),%r15
lea    0x8(%rsp),%r12
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm0
mulsd  0xe82(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xe7c(%rip),%xmm0
divsd  (%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
mulsd  (%rsp),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
cmp    $0x2,%eax
je     1170 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
br label %4
4: ; preds = %7, %0
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %20
7: ; preds = %4
%8 = load double, double* %2
%9 = fmul double 5.000000e-01, %8
%10 = load double, double* %3
%11 = fdiv double 0x401921FB54442D18, %10
%12 = fptosi double %11 to i32
%13 = call double @sin(i32 %12)
%14 = fmul double %9, %13
%15 = load double, double* %2
%16 = fmul double %14, %15
%17 = load double, double* %3
%18 = fmul double %16, %17
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %18)
br label %4
20: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %22
7: ; preds = %0, %7
%8 = load double, double* %1
%9 = fmul double %8, 5.000000e-01
%10 = load double, double* %2
%11 = fdiv double 0x401921FB54442D18, %10
%12 = fptosi double %11 to i32
%13 = call double @sin(i32 %12)
%14 = fmul double %9, %13
%15 = load double, double* %1
%16 = fmul double %14, %15
%17 = load double, double* %2
%18 = fmul double %16, %17
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %18)
%20 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%21 = icmp eq i32 %20, 2
br i1 %21, label %7, label %22
22: ; preds = %7, %0
ret i32 0
}