TuringLang / Bijectors.jl

Implementation of normalising flows and constrained random variable transformations
https://turinglang.org/Bijectors.jl/
MIT License
200 stars 33 forks source link

Use more conservative initial bracket #206

Closed devmotion closed 2 years ago

devmotion commented 2 years ago

Fixes the numerical issues reported in https://github.com/TuringLang/Bijectors.jl/issues/204#issuecomment-947145099. I checked that the new test errors with the master branch.

cc: @Red-Portal

devmotion commented 2 years ago

@torfjelde It would be great if you could review this PR, it shouldn't take much time :slightly_smiling_face: It addresses a problem in the linked comment where the root is at one of the boundaries of the (mathematically correct) initial bracket but due to numerical issues function evaluation at both end points of the interval actually returned values of the same sign (and hence it was not a proper bracket).