QEDjl-project / QEDcore.jl

[WIP] Core types and functions for QED.jl
https://qedjl-project.github.io/QEDcore.jl/stable/
MIT License
1 stars 3 forks source link

More general element types #60

Open szabo137 opened 2 months ago

szabo137 commented 2 months ago

Problem statement

Many implementations of numerical objects restrict the type of their inner scalar to float64. This can be too restrictive and may cause bugs, which are hard to trace back.

Suggested solution

I suggest parameterizing the respective types (see below) and using Real or Number as the upper bound for the type parameter. Conveniently, we should implement versions of Base.convert and Base.promote_type, so bugs caused by mismatching numeric types are suppressed.

Types to be updated

Additional todos

szabo137 commented 2 months ago

20 is similar, but for function signatures