# Distributions.jl Truncate with Dual?

**URL:** <https://discourse.julialang.org/t/distributions-jl-truncate-with-dual/15141>\
**Category:** General Usage\
**Created:** [September 18, 2018, 6:57pm UTC](https://discourse.julialang.org/t/distributions-jl-truncate-with-dual/15141 "2018-09-18T18:57:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabrielgellner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gabrielgellner/32/75_2.png) [@gabrielgellner](https://discourse.julialang.org/u/gabrielgellner)\
**Post date:** [September 18, 2018, 6:57pm UTC](https://discourse.julialang.org/t/distributions-jl-truncate-with-dual/15141/1 "2018-09-18T18:57:41Z")

</div>

Trying to make use a truncated distribution that has parameters that are Dual numbers but I get an error.

```julia
using Distributions
using ForwardDiff
Truncated(Normal(ForwardDiff.Dual(0.0), ForwardDiff.Dual(1.0)), -10, 10)

```

But I get an error about creating the distributions. I am not sure if this is a change to how `Float64` works with Duals, or what. But I notice:  
[https://github.com/JuliaStats/Distributions.jl/pull/586](https://github.com/JuliaStats/Distributions.jl/pull/586)

Which suggests this usage should work, and furthermore is tested for? Am I just calling it wrong? I find the test harness in Distributions hard to understand with the all expression + json use.
