Both branches of the conditional (ternary) operator ? : get evaluated.  So to make this efficient, you want to do this:

```
double bessel0 = 0;
if (compute_bessel0)
  bessel0 = boost::math::cyl_bessel_i(0, kappa_dbl);
```