JuliaSmoothOptimizers / JuliaSmoothOptimizers/MultiPrecisionR2
Should type unstable evaluations be allowed ?
- Dominant language
- Julia
- Stars
- 1
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Type unstable evaluation refers to an evaluation which output floating point format is different than the one of its argument.
Example:
```julia
a = ones(10) # Vector{Float64}
f(x) = dot(x,a)
x32 = ones(Float32,10) # Float32 vector
f(x32) # this is a Float64 but input is a Float32 vector: type unstable
```
Should type unstable operation be allowed in MultiPrecisionR2 ? In the above, it's likely that the dot product is performed with `Float64` format operations, defeating the purpose of multi-precision.
Should we check for type unstable evaluation at `FPMPNLPModel` instanciation or allow it and let the user deal with that ? Maybe just check and throw a warning if necessary ?
In the current version of the package, type unstability is only checked for interval evaluation and throw an error.
Contributor guide
Assessment
This issue has not been assessed yet.