double max_projection_density(double width) {
  return (18901162820 * width * width * width * width * width -
          413277197352 * width * width * width * width +
          2599824151495 * width * width * width -
          8584659866040 * width * width + 8276688322695 * width -
          5841891340218) /
         (-394441476660.0);
}


x86 assembly (clang, -O0):
<max_projection_density>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xf1f(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  0xef6(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xeb3(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xe4e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe36(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe22(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_projection_density>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xee8(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movsd  0xed0(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  0xec0(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
mulsd  0xeb4(%rip),%xmm0
addsd  %xmm1,%xmm0
addsd  0xeb0(%rip),%xmm0
divsd  0xeb0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @max_projection_density(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 0x42119A636D100000, %3
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = load double, double* %2
%10 = fmul double %8, %9
%11 = load double, double* %2
%12 = load double, double* %2
%13 = fmul double 0x42580E4F650A0000, %12
%14 = load double, double* %2
%15 = fmul double %13, %14
%16 = load double, double* %2
%17 = fmul double %15, %16
%18 = load double, double* %2
%19 = fmul double %17, %18
%20 = fneg double %19
%21 = call double @llvm.fmuladd.f64(double %10, double %11, double %20)
%22 = load double, double* %2
%23 = fmul double 0x4282EA8CC29E3800, %22
%24 = load double, double* %2
%25 = fmul double %23, %24
%26 = load double, double* %2
%27 = call double @llvm.fmuladd.f64(double %25, double %26, double %21)
%28 = load double, double* %2
%29 = fmul double 0x429F3B166846E000, %28
%30 = load double, double* %2
%31 = fneg double %29
%32 = call double @llvm.fmuladd.f64(double %31, double %30, double %27)
%33 = load double, double* %2
%34 = call double @llvm.fmuladd.f64(double 0x429E1C4445021C00, double %33, double %32)
%35 = fsub double %34, 0x429540AF6EBEE800
%36 = fdiv double %35, 0xC256F5A2D28D0000
ret double %36
}

LLVM IR (-O2):
define double @max_projection_density(double %0) {
%2 = fmul double %0, 0x42119A636D100000
%3 = fmul double %2, %0
%4 = fmul double %3, %0
%5 = fmul double %4, %0
%6 = fmul double %0, 0xC2580E4F650A0000
%7 = fmul double %6, %0
%8 = fmul double %7, %0
%9 = fmul double %8, %0
%10 = tail call double @llvm.fmuladd.f64(double %5, double %0, double %9)
%11 = fmul double %0, 0x4282EA8CC29E3800
%12 = fmul double %11, %0
%13 = tail call double @llvm.fmuladd.f64(double %12, double %0, double %10)
%14 = fmul double %0, 0xC29F3B166846E000
%15 = tail call double @llvm.fmuladd.f64(double %14, double %0, double %13)
%16 = tail call double @llvm.fmuladd.f64(double %0, double 0x429E1C4445021C00, double %15)
%17 = fadd double %16, 0xC29540AF6EBEE800
%18 = fdiv double %17, 0xC256F5A2D28D0000
ret double %18
}