float deflection(ty, typ)
float ty, typ;
{
  return ((1. - exp(-ty * (exp(2 * typ) - 0.99999))) /
          (1. - exp(-(exp(2 * typ) - 0.99999))));
}


x86 assembly (clang, -O0):
<deflection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm1,-0x20(%rbp)
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  0xeb6(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xe90(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe70(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  0xe6f(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <exp@plt>
movsd  0xe51(%rip),%xmm1
subsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
movsd  0xe19(%rip),%xmm1
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deflection>:
sub    $0x18,%rsp
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
xorps  0xedd(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
addss  %xmm1,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
call   1030 <exp@plt>
addsd  0xed5(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <exp@plt>
movsd  0xeca(%rip),%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
addsd  0xea5(%rip),%xmm0
xorpd  0xe8d(%rip),%xmm0
call   1030 <exp@plt>
movsd  0xe98(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @deflection(double %0, double %1) {
%3 = alloca float
%4 = alloca float
%5 = fptrunc double %0 to float
%6 = fptrunc double %1 to float
store float %5, float* %3
store float %6, float* %4
%7 = load float, float* %3
%8 = fneg float %7
%9 = fpext float %8 to double
%10 = load float, float* %4
%11 = fmul float 2.000000e+00, %10
%12 = fpext float %11 to double
%13 = call double @exp(double %12)
%14 = fsub double %13, 9.999900e-01
%15 = fmul double %9, %14
%16 = call double @exp(double %15)
%17 = fsub double 1.000000e+00, %16
%18 = load float, float* %4
%19 = fmul float 2.000000e+00, %18
%20 = fpext float %19 to double
%21 = call double @exp(double %20)
%22 = fsub double %21, 9.999900e-01
%23 = fneg double %22
%24 = call double @exp(double %23)
%25 = fsub double 1.000000e+00, %24
%26 = fdiv double %17, %25
%27 = fptrunc double %26 to float
ret float %27
}

LLVM IR (-O2):
define float @deflection(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = fneg float %3
%6 = fpext float %5 to double
%7 = fmul float %4, 2.000000e+00
%8 = fpext float %7 to double
%9 = tail call double @exp(double %8)
%10 = fadd double %9, -9.999900e-01
%11 = fmul double %10, %6
%12 = tail call double @exp(double %11)
%13 = fsub double 1.000000e+00, %12
%14 = tail call double @exp(double %8)
%15 = fadd double %14, -9.999900e-01
%16 = fneg double %15
%17 = tail call double @exp(double %16)
%18 = fsub double 1.000000e+00, %17
%19 = fdiv double %13, %18
%20 = fptrunc double %19 to float
ret float %20
}