We can turn circle :: ℝ -> SymbolicObj2 into e.g. circle :: Num a => a -> SymbolicObj2 a.
That would allow us to use different numerical types instead of being fixed on Doubles. Some fun examples include
It would also open a lot of doors to other backends like accelerate or GLSL, where symbolic objects could be represented as, well.. symbolic functions.
Also an analytical simplification step could be implemented before actual discretization and evaluation which could drastically improve performance for some cases.
We can turn
circle :: ℝ -> SymbolicObj2into e.g.circle :: Num a => a -> SymbolicObj2 a.That would allow us to use different numerical types instead of being fixed on
Doubles. Some fun examples includeIntegerCRealfrom https://hackage.haskell.org/package/exact-realSymfrom https://hackage.haskell.org/package/numbers-3000.2.0.2/docs/Data-Number-Symbolic.htmlℝfrom promote ℝ to an instance of a typeclass #225unitsordimensional)It would also open a lot of doors to other backends like
accelerateorGLSL, where symbolic objects could be represented as, well.. symbolic functions.Also an analytical simplification step could be implemented before actual discretization and evaluation which could drastically improve performance for some cases.