On 5/23/13 10:04 PM, Marco Inacio wrote:
> In src/stan/agrad/fwd/log_diff_exp.hpp:
>
>> +      if(x1.val_ <= x2.val_)
>> +        return fvar<typename
>> +                  stan::return_type<T1,T2>::type>(NOT_A_NUMBER, NOT_A_NUMBER);
>> +      return fvar<typename
>> +                  stan::return_type<T1,T2>::type>(log_diff_exp(x1.val_, x2.val_),
>> +                     x1.d_ / (1 - exp(x2.val_ - x1.val_) ) + x2.d_ / (1 - exp(x1.val_ - x2.val_) ) );
>> +    }
>> +
>> +    template <typename T1, typename T2>
>> +    inline
>> +    fvar<typename stan::return_type<T1,T2>::type>
>> +    log_diff_exp(const T1& x1, const fvar<T2>& x2) {
>> +      using stan::math::log_diff_exp;
>> +      using stan::math::NOT_A_NUMBER;
>> +      using std::exp;
>> +      if(x1 <= x2.val_)
>
> There's a considerable amount of these:
...
> Sorry, I created more of them.

It's easy to fix.  And it's good we caught this now.
I'm the one who started this in the first place.

I'm going to start a fresh thread on stan-dev to
discuss what it should look like and why.

- Bob