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

Too restrictive typing (Float64) #20

Open
tjungni opened this issue Nov 30, 2023 · 1 comment
Open

Too restrictive typing (Float64) #20

tjungni opened this issue Nov 30, 2023 · 1 comment
Labels
03 - Confirmed The bug filed in this issue is confirmed by a maintainer 05 - Enhancement Improvements of existing code good first issue Good for newcomers

Comments

@tjungni
Copy link
Member

tjungni commented Nov 30, 2023

Many functions currently expect arguments to be Float64 instead of Real.
Constants will ideally be defined as irrationals so they don't force type promotions in calculations with other values.
For example,

function OutgoingFermionSpinor(
    mom::T, mass::Float64
) where {T<:AbstractLorentzVector{TE}} where {TE<:Real}
    return OutgoingFermionSpinor(_build_particle_booster(mom, mass))
end

expects the mass to be Float64 but I defined the electron mass as an irrational constant in my code and tried to pass that as mass.

@tjungni tjungni added good first issue Good for newcomers 04 - Performance Improvements or issues regarding performance and timing labels Nov 30, 2023
@szabo137 szabo137 added the 03 - Confirmed The bug filed in this issue is confirmed by a maintainer label Nov 30, 2023
@szabo137 szabo137 transferred this issue from QEDjl-project/QEDbase.jl Jun 18, 2024
@szabo137 szabo137 added 05 - Enhancement Improvements of existing code and removed 04 - Performance Improvements or issues regarding performance and timing labels Sep 13, 2024
@szabo137
Copy link
Member

similar issue for element types: #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
03 - Confirmed The bug filed in this issue is confirmed by a maintainer 05 - Enhancement Improvements of existing code good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants