stan-dev / math

The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic modeling, linear algebra, and equation solving.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
738 stars 186 forks source link

add test for nan derivatives for distribution tests #87

Open syclik opened 9 years ago

syclik commented 9 years ago

From @syclik on March 10, 2015 17:48

the distribution tests currently don't check if the derivatives are nan. I think they should.

Copied from original issue: stan-dev/stan#1358

syclik commented 9 years ago

I fixed the distribution tests. I located the distributions that have problems. We'll need to fix all of them by hand.

Warnings:
Failed tests:
syclik commented 9 years ago

From @bob-carpenter on March 16, 2015 22:52

Is the plan to have them throw if they catch NaN values? I think that'd be better than returning NaN values, which would cause rejection, but then would fail in the double case where you didn't care about gradients.