double gauss_small(const double x) {
  unsigned int i;
  double result = 0.0;
  double xsq;
  double xnum;
  double xden;
  const double a[5] = {2.2352520354606839287, 161.02823106855587881,
                       1067.6894854603709582, 18154.981253343561249,
                       0.065682337918207449113};
  const double b[4] = {47.20258190468824187, 976.09855173777669322,
                       10260.932208618978205, 45507.789335026729956};
  xsq = x * x;
  xnum = a[4] * xsq;
  xden = xsq;
  for (i = 0; i < 3; i++) {
    xnum = (xnum + a[i]) * xsq;
    xden = (xden + b[i]) * xsq;
  }
  result = x * (xnum + a[3]) / (xden + b[3]);
  return result;
}


x86 assembly (clang, -O0):
<gauss_small>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xea1(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe8c(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jae    121c <gauss_small+0x10c>
movsd  -0x28(%rbp),%xmm0
mov    -0xc(%rbp),%eax
addsd  -0x60(%rbp,%rax,8),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    -0xc(%rbp),%eax
addsd  -0x80(%rbp,%rax,8),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d4 <gauss_small+0xc4>
movsd  -0x8(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
addsd  -0x48(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss_small>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xeec(%rip),%xmm2
mulsd  %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
addpd  0xef4(%rip),%xmm2
unpcklpd %xmm1,%xmm0
unpcklpd %xmm1,%xmm1
mulpd  %xmm1,%xmm2
addpd  0xef0(%rip),%xmm2
mulpd  %xmm1,%xmm2
addpd  0xef4(%rip),%xmm2
mulpd  %xmm2,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@__const.gauss_small.b = [4 x double] [double 0x404799EE342FB2DE, double 0x408E80C9D57E55B8, double 0x40C40A77529CADC8, double 0x40E63879423B87AD]
define double @gauss_small(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca [5 x double]
%9 = alloca [4 x double]
store double %0, double* %2
store double 0.000000e+00, double* %4
%10 = bitcast [5 x double]* %8 to i8*
%11 = bitcast i8* %10 to [5 x double]*
%12 = getelementptr inbounds [5 x double], [5 x double]* %11, i32 0, i32 0
store double 0x4001E1CBD1B4F7F3, double* %12
%13 = getelementptr inbounds [5 x double], [5 x double]* %11, i32 0, i32 1
store double 0x406420E744D785B7, double* %13
%14 = getelementptr inbounds [5 x double], [5 x double]* %11, i32 0, i32 2
store double 0x4090AEC20879FD71, double* %14
%15 = getelementptr inbounds [5 x double], [5 x double]* %11, i32 0, i32 3
store double 0x40D1BABECCDAD2EC, double* %15
%16 = getelementptr inbounds [5 x double], [5 x double]* %11, i32 0, i32 4
store double 0x3FB0D08EC54894E1, double* %16
%17 = bitcast [4 x double]* %9 to i8*
%18 = load double, double* %2
%19 = load double, double* %2
%20 = fmul double %18, %19
store double %20, double* %5
%21 = getelementptr inbounds [5 x double], [5 x double]* %8, i64 0, i64 4
%22 = load double, double* %21
%23 = load double, double* %5
%24 = fmul double %22, %23
store double %24, double* %6
%25 = load double, double* %5
store double %25, double* %7
store i32 0, i32* %3
br label %26
26: ; preds = %46, %1
%27 = load i32, i32* %3
%28 = icmp ult i32 %27, 3
br i1 %28, label %29, label %49
29: ; preds = %26
%30 = load double, double* %6
%31 = load i32, i32* %3
%32 = zext i32 %31 to i64
%33 = getelementptr inbounds [5 x double], [5 x double]* %8, i64 0, i64 %32
%34 = load double, double* %33
%35 = fadd double %30, %34
%36 = load double, double* %5
%37 = fmul double %35, %36
store double %37, double* %6
%38 = load double, double* %7
%39 = load i32, i32* %3
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 %40
%42 = load double, double* %41
%43 = fadd double %38, %42
%44 = load double, double* %5
%45 = fmul double %43, %44
store double %45, double* %7
br label %46
46: ; preds = %29
%47 = load i32, i32* %3
%48 = add i32 %47, 1
store i32 %48, i32* %3
br label %26
49: ; preds = %26
%50 = load double, double* %2
%51 = load double, double* %6
%52 = getelementptr inbounds [5 x double], [5 x double]* %8, i64 0, i64 3
%53 = load double, double* %52
%54 = fadd double %51, %53
%55 = fmul double %50, %54
%56 = load double, double* %7
%57 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 3
%58 = load double, double* %57
%59 = fadd double %56, %58
%60 = fdiv double %55, %59
store double %60, double* %4
%61 = load double, double* %4
ret double %61
}

LLVM IR (-O2):
define double @gauss_small(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, 0x3FB0D08EC54894E1
%4 = fadd double %3, 0x4001E1CBD1B4F7F3
%5 = fmul double %2, %4
%6 = insertelement <2 x double> poison, double %5, i64 0
%7 = insertelement <2 x double> %6, double %2, i64 1
%8 = fadd <2 x double> %7, <double 0x406420E744D785B7, double 0x404799EE342FB2DE>
%9 = insertelement <2 x double> poison, double %2, i64 0
%10 = shufflevector <2 x double> %9, <2 x double> poison, <2 x i32> zeroinitializer
%11 = fmul <2 x double> %10, %8
%12 = fadd <2 x double> %11, <double 0x4090AEC20879FD71, double 0x408E80C9D57E55B8>
%13 = fmul <2 x double> %10, %12
%14 = fadd <2 x double> %13, <double 0x40D1BABECCDAD2EC, double 0x40C40A77529CADC8>
%15 = insertelement <2 x double> poison, double %0, i64 0
%16 = insertelement <2 x double> %15, double %2, i64 1
%17 = fmul <2 x double> %14, %16
%18 = extractelement <2 x double> %17, i64 1
%19 = fadd double %18, 0x40E63879423B87AD
%20 = extractelement <2 x double> %17, i64 0
%21 = fdiv double %20, %19
ret double %21
}