Number types with varying levels of safety
This has been on people's minds for a while but had no issue, https://github.com/JuliaSymbolics/SymbolicUtils.jl/issues/269 https://github.com/JuliaSymbolics/SymbolicUtils.jl/issues/327
Using syntax ChrisRackauckas wrote down in #511
@variables a::Real # real under the assumption that substitutions are limiting behavior, so `a/a = 1` because it does even as `a->0`
@variables a::SafeReal # real without limiting assumptions
@variables a::SymbolicFloat # only assumptions floating point safe simplifications
Here we would want x/x to be 1 for ::Real, but it should remain unsimplified for x::SafeReal. x::SymbolicFloat should always undergo transformations that are valid within the IEEE floating point spec and so on. Real should be the default.
I think we can also use ℝ as an alias for SafeReal :)
I guess this library of types can be in SU.
Should Reals of different types be allowed to interact with each other? If yes, we are going to need N^M methods for every function where N is the number of types and M is the number of arguments...
I would prefer one way to explicitly convert between them, and each type being closed within itself...
┆Issue is synchronized with this Trello card by Unito