stan-dev/stan — pull request #869 by syclik (2014-08-14 03:48:09+00:00)
Title: Feature/issue 852 as bool

#### Summary:

Corrects behavior for `stan::math::as_bool` with integer arguments.

#### Intended Effect:

`as_bool` now returns a boolean.
For integers, the old implementation returned the integer that was passed in. The new implementation returns true for all integers not equal to 0 and false for an input of 0.

#### How to Verify:

Unit test was added to src/test/unit/math/functions/as_bool_test.cpp.

#### Side Effects:

None. This leaves the behavior for NaN as-is, (as_bool(NaN) returns true)

#### Documentation:

None. Behavior anywhere this is used stays the same.

#### Reviewer Suggestions:

@bob-carpenter