<p dir="auto">With current 0.5 master:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; map(Float32, [3,4,5])
3-element Array{Float32,1}:
 3.0
 4.0
 5.0

julia&gt; broadcast(Float32, [3,4,5])
3-element Array{Int64,1}:
 3
 4
 5"><pre class="notranslate"><code class="notranslate">julia&gt; map(Float32, [3,4,5])
3-element Array{Float32,1}:
 3.0
 4.0
 5.0

julia&gt; broadcast(Float32, [3,4,5])
3-element Array{Int64,1}:
 3
 4
 5
</code></pre></div>
<p dir="auto">We presumably want to return a <code class="notranslate">Float32</code> array in both cases?</p>
<p dir="auto">cc: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ViralBShah/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ViralBShah">@ViralBShah</a>: this affects the case you asked about in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="43641309" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8450" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8450/hovercard" href="https://github.com/JuliaLang/julia/issues/8450">#8450</a>, since my <code class="notranslate">f.(x...)</code> implementation in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="133107578" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/15032" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/15032/hovercard" href="https://github.com/JuliaLang/julia/pull/15032">#15032</a> is equivalent to <code class="notranslate">broadcast</code>.</p>
<p dir="auto">The following code fails with an <code class="notranslate">InexactError()</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="X = [1,2,3]
Y = [4 5]
broadcast(atan2, X, Y)"><pre class="notranslate"><code class="notranslate">X = [1,2,3]
Y = [4 5]
broadcast(atan2, X, Y)
</code></pre></div>
<p dir="auto">whereas</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[atan2(x,y) for x in X, y in Y ]"><pre class="notranslate"><code class="notranslate">[atan2(x,y) for x in X, y in Y ]
</code></pre></div>
<p dir="auto">(albeit producing an array of type <code class="notranslate">Any</code>), while</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="atan2([1,2,3],[4,5,6])"><pre class="notranslate"><code class="notranslate">atan2([1,2,3],[4,5,6])
</code></pre></div>
<p dir="auto">produces an array of <code class="notranslate">Float64</code>.</p>
<p dir="auto">Can we improve the type inference so that all three cases can generate <code class="notranslate">Float64</code> arrays?  Note that this is needed for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="20043830" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/4363" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/4363/hovercard" href="https://github.com/JuliaLang/julia/issues/4363">#4363</a> (for <code class="notranslate">@vectorize_2arg</code> to use <code class="notranslate">broadcast</code>).</p>