Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More general element types #60

Open
7 tasks
szabo137 opened this issue Sep 13, 2024 · 1 comment
Open
7 tasks

More general element types #60

szabo137 opened this issue Sep 13, 2024 · 1 comment
Labels
05 - Enhancement Improvements of existing code

Comments

@szabo137
Copy link
Member

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

  • 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
@szabo137 szabo137 added the 05 - Enhancement Improvements of existing code label Sep 13, 2024
@szabo137
Copy link
Member Author

#20 is similar, but for function signatures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
05 - Enhancement Improvements of existing code
Projects
None yet
Development

No branches or pull requests

1 participant