You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
DiracMatrix
BiSpinor
AdjointBiSpinor
SFourMomentum
MFourMomentum
Additional todos
unit tests should include checks for Float64 and Float32
unit test to check if Lorentz boosts preserve the element type
The text was updated successfully, but these errors were encountered:
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
orNumber
as the upper bound for the type parameter.Conveniently, we should implement versions of
Base.convert
andBase.promote_type
, so bugs caused by mismatching numeric types are suppressed.Types to be updated
DiracMatrix
BiSpinor
AdjointBiSpinor
SFourMomentum
MFourMomentum
Additional todos
Float64
andFloat32
The text was updated successfully, but these errors were encountered: