stan-dev/stan — pull request #870 by syclik (2014-08-14 03:59:31+00:00)
Title: Feature/issue 853 fdim nan

#### Summary:

Fixes `stan::math::fdim` so NaN inputs return NaN.

#### Intended Effect:

The `stan::math::fdim` function won't swallow NaN and return 0.

The fix was to call `::fdim` directly, which is defined in math.h.

#### How to Verify:

Unit test in src/test/unit/math/functions/fdim_test.cpp.

#### Side Effects:

None.

#### Documentation:

I think this was the expected behavior.

#### Reviewer Suggestions:

Anyone.