#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 */
scalar_t__ EOF;
int acos(double);
int /*<<< orphan*/ printf(char *, double);
scalar_t__ scanf(char *, double *, double *);
double sin(double);
int main() {
  double r, n, ans = 0, angle, pi, a, b, c, s;
  while (scanf("%lf %lf", &r, &n) != EOF) {
    angle = (4 * acos(0.0)) / n;
    ans = (r * r * sin(angle) * n) * .5;
    printf("%.3lf\n", ans);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1060 <scanf@plt>
mov    0x2e76(%rip),%rcx
cmp    (%rcx),%rax
je     11e5 <main+0xa5>
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
shl    $0x2,%eax
cvtsi2sd %eax,%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe3a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
jmp    1157 <main+0x17>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
lea    0xeb4(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1060 <scanf@plt>
mov    0x2e7e(%rip),%r13
cmp    0x0(%r13),%rax
je     11ed <main+0xad>
lea    0xe99(%rip),%r14
lea    0xe8a(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
call   1040 <acos@plt>
shl    $0x2,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
divsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
movsd  %xmm1,0x18(%rsp)
call   1050 <sin@plt>
mulsd  0x18(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
mulsd  0xe2f(%rip),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1060 <scanf@plt>
cmp    0x0(%r13),%rax
jne    1190 <main+0x50>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%lf %lf\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %4
br label %11
11: ; preds = %15, %0
%12 = call i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%13 = load i64, i64* @EOF
%14 = icmp ne i64 %12, %13
br i1 %14, label %15, label %32
15: ; preds = %11
%16 = call i32 @acos(double 0.000000e+00)
%17 = mul nsw i32 4, %16
%18 = sitofp i32 %17 to double
%19 = load double, double* %3
%20 = fdiv double %18, %19
store double %20, double* %5
%21 = load double, double* %2
%22 = load double, double* %2
%23 = fmul double %21, %22
%24 = load double, double* %5
%25 = call double @sin(double %24)
%26 = fmul double %23, %25
%27 = load double, double* %3
%28 = fmul double %26, %27
%29 = fmul double %28, 5.000000e-01
store double %29, double* %4
%30 = load double, double* %4
%31 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %30)
br label %11
32: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@EOF = global i64 0
@.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 i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %25, label %8
8: ; preds = %0, %8
%9 = call i32 @acos(double 0.000000e+00)
%10 = shl nsw i32 %9, 2
%11 = sitofp i32 %10 to double
%12 = load double, double* %2
%13 = fdiv double %11, %12
%14 = load double, double* %1
%15 = fmul double %14, %14
%16 = call double @sin(double %13)
%17 = fmul double %15, %16
%18 = load double, double* %2
%19 = fmul double %17, %18
%20 = fmul double %19, 5.000000e-01
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %20)
%22 = call i64 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%23 = load i64, i64* @EOF
%24 = icmp eq i64 %22, %23
br i1 %24, label %25, label %8
25: ; preds = %8, %0
ret i32 0
}