Hello everybody,

I started to experiment with BigFloats and I am not sure how to best (and with minimum manual effort) handle numerical constants in functions.

The following shows the behaviour as documented, the constant `2.0/3.0`

gets not automatically promoted to BigFloat

```
julia> setprecision(128)
128
julia> function g_one(x)
2.0/3.0*x
end
g (generic function with 1 method)
julia> g_one(BigFloat(1.0))
6.666666666666666296592325124947819858789e-01
```

Of course one can do

```
julia> function g_two(x::T) where {T}
a::T = 2.0
b::T = 3.0
a/b*x
end
g (generic function with 1 method)
julia> g_two(BigFloat(1.0))
6.666666666666666666666666666666666666676e-01
```

but note the next (this again is as documented, promotion to BigFloat happens after 2.0/3.0 is computed in `Float64`

)

```
julia> function g_three(x::T) where {T}
a::T = 2.0/3.0
a*x
end
g (generic function with 1 method)
julia> g_three(BigFloat(1.0))
6.666666666666666296592325124947819858789e-01
```

What confuses me is now this.

Assume the function is something more complicated with a lot of numerical constants. Without rewriting (pulling out the constants, storing them in tuples while making sure they are correctly promoted) it is not possible to just switch to `BigFloat`

and get a cosistent accuracy because `Float64`

constants do not get promoted ?

How would I reliably and with minimum effort ensure everything has the right precision ? Is there perhaps some premade macro to cast every `Float64`

constant to `BigFloat`

? I suspect @generated could be used for this, but this to me appears to be a bit of an overkill for some quick experiment, especially since I never had any contact with it beyond knowing it exists.

Finally, one might observe that in something like `2.0*x`

where `x`

is a `BigFloat`

this promotion behaviour is completely invisible which might lead to some confusion if one did not read the documentation.

Best Regards