# Not clear what 0.01f0x is in the Flux docs

**URL:** <https://discourse.julialang.org/t/not-clear-what-0-01f0x-is-in-the-flux-docs/40553>\
**Category:** New to Julia\
**Tags:** question, documentation, flux\
**Created:** [June 1, 2020, 10:20am UTC](https://discourse.julialang.org/t/not-clear-what-0-01f0x-is-in-the-flux-docs/40553 "2020-06-01T10:20:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![natema](https://avatars.discourse-cdn.com/v4/letter/n/ba9def/32.png) [@natema](https://discourse.julialang.org/u/natema)\
**Post date:** [June 1, 2020, 10:20am UTC](https://discourse.julialang.org/t/not-clear-what-0-01f0x-is-in-the-flux-docs/40553/1 "2020-06-01T10:20:29Z")

</div>

I searched a bit, but it remains unclear to me what `0.01f0x` is in [the Flux docs](https://fluxml.ai/Flux.jl/stable/performance/#Preserve-inputs'-types-1):

> While one could change the activation function (e.g. to use `0.01f0x` ), the idiomatic (and safe way) …

Perhaps a typo?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [June 1, 2020, 10:25am UTC](https://discourse.julialang.org/t/not-clear-what-0-01f0x-is-in-the-flux-docs/40553/2 "2020-06-01T10:25:03Z")

</div>

`0.01f0` is how you (can) type 0.01 as a `Float32` in Julia, and that is multiplied with `x`:

```julia
julia> x = 2
2

julia> 0.01f0x
0.02f0

```

---

<div class="post-metadata">

**Author:** ![natema](https://avatars.discourse-cdn.com/v4/letter/n/ba9def/32.png) [@natema](https://discourse.julialang.org/u/natema)\
**Post date:** [June 1, 2020, 10:42am UTC](https://discourse.julialang.org/t/not-clear-what-0-01f0x-is-in-the-flux-docs/40553/3 "2020-06-01T10:42:27Z")

</div>

Thanks, my bad: I read that we can omit the `*` in Julia, but didn’t _internalize_ it yet.

---

<div class="post-metadata">

**Author:** ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Post date:** [June 1, 2020, 1:52pm UTC](https://discourse.julialang.org/t/not-clear-what-0-01f0x-is-in-the-flux-docs/40553/4 "2020-06-01T13:52:31Z")

</div>

I’d argue that it’s bad style to omit the `*` in this case, since it makes it harder to read the numeric literal. There’s also an inconsistency between float and byte literals for this behavior:

```julia
julia> x = 0
0

julia> 0f0x
0.0f0

julia> 0x0x
ERROR: syntax: invalid numeric constant "0x0x"
Stacktrace:
 [1] top-level scope at REPL[14]:0
 [2] eval(::Module, ::Any) at ./boot.jl:331
 [3] eval_user_input(::Any, ::REPL.REPLBackend) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
 [4] run_backend(::REPL.REPLBackend) at /Users/alexames/.julia/packages/Revise/MgvIv/src/Revise.jl:1023
 [5] top-level scope at none:0

julia> 0x0*x
0

```

…which makes sense, since we need to handle e.g.

```julia
julia> a = 2
2

julia> 0x0a
0x0a

```

…but for the sake of clarity, I would only ever use the implicit multiplication syntax for undecorated numeric literals like `20.0x` (never `2e1x`).

---

<div class="post-metadata">

**Author:** ![mcabbott](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcabbott/32/6603_2.png) [@mcabbott](https://discourse.julialang.org/u/mcabbott)\
**Post date:** [June 1, 2020, 3:23pm UTC](https://discourse.julialang.org/t/not-clear-what-0-01f0x-is-in-the-flux-docs/40553/5 "2020-06-01T15:23:35Z")

</div>

Good point. And probably they should not be printed this way:

```julia
julia> :(2 * a)
:(2a)

julia> :(2f0 * a)
:(2.0f0a)

julia> :(0x0 * a)
:(0x00a)

julia> 0x00a == 10
true

```
