# Unexpected behavior of Flux.jl

**URL:** <https://discourse.julialang.org/t/unexpected-behavior-of-flux-jl/15460>\
**Category:** Machine Learning\
**Tags:** question\
**Created:** [September 25, 2018, 9:21am UTC](https://discourse.julialang.org/t/unexpected-behavior-of-flux-jl/15460 "2018-09-25T09:21:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [September 25, 2018, 9:21am UTC](https://discourse.julialang.org/t/unexpected-behavior-of-flux-jl/15460/1 "2018-09-25T09:21:39Z")

</div>

```nohighlight
julia> f(x) = 3x^2 + 2x +1
f (generic function with 1 method)

julia> Tracker.gradient(f,-2)
ERROR: DomainError with log:
-2.0 will only return a complex

```

Is this documented somewhere and I’m missing it?
