<long double> issue

33 views
Skip to first unread message

Bob Carpenter

unread,
May 5, 2016, 2:09:01 AM5/5/16
to stan...@googlegroups.com
Anyone know what's up with this?

"Exception thrown at line 82: Error in function boost::math::lgamma<long double>(long double): Evaluation of lgamma at 0."

It was a message reported by Swupnil Sahai on stan-users.
I followed up, and he says he has a 2014 Macbook Pro, so I
have no idea what a long double is doing in there.

If nobody knows, I'll try to recreate the report on my machine
and file an issue.

- Bob


Daniel Lee

unread,
May 5, 2016, 8:09:29 AM5/5/16
to stan...@googlegroups.com
No idea. My guess is that we didn't check inputs correctly and let 0 pass through to lgamma.

If you can set up the test case, we can track that down pretty quickly.


Daniel
> --
> You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Bob Carpenter

unread,
May 5, 2016, 12:10:02 PM5/5/16
to stan...@googlegroups.com
Sorry, my issue was with how the type ***long double*** got into
the mix. We shouldn't be using that anywhere. And given recent
speed reports, I'm wondering if this is somehow negatively impacting
the speed of Stan code.

- Bob

Daniel Lee

unread,
May 5, 2016, 12:25:37 PM5/5/16
to stan-dev mailing list
I have no idea how we have the "long double" type.

If you know how to recreate Swupnil's example, that'll be a good start. (normally I'd volunteer, but I'm feeling a little behind now.)


Daniel




Ben Goodrich

unread,
May 5, 2016, 1:12:15 PM5/5/16
to stan development mailing list
On Thursday, May 5, 2016 at 12:10:02 PM UTC-4, Bob Carpenter wrote:
Sorry, my issue was with how the type ***long double*** got into
the mix.  We shouldn't be using that anywhere.  And given recent
speed reports, I'm wondering if this is somehow negatively impacting
the speed of Stan code.

Macs have been using libc++ as their C++ library for a while, regardless of whether C++11 is specified as the standard. So, it may just be doing what it would do under C++11 where a long double is well-defined.

Ben

Bob Carpenter

unread,
May 5, 2016, 1:35:02 PM5/5/16
to stan...@googlegroups.com
I created an issue. But the way things are going, I won't
have time to look into it this year.

- Bob
Reply all
Reply to author
Forward
0 new messages