Two things.

1.  You want to call by reference for fvar, not by value, so include the ampersand.

```
falling_factorial(const fvar<T>& x, ...
```

2.   You should have all three fvar signatures,

```
fvar<T> falling_factorial(const fvar<T>& x1, const fvar<T>& x2);
fvar<T> falling_factorial(const fvar<T>& x1, double x2);
fvar<T> falling_factorial(double, const fvar<T>& x2);
```

plus the double,double version in the math namespace.




There's no reason not to make the second argument a variable, too.  So you'd need a bunch of signatures:

```