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

Can't deal with complex number.(mayby) #1372

Open
sesameman opened this issue Nov 21, 2024 · 0 comments
Open

Can't deal with complex number.(mayby) #1372

sesameman opened this issue Nov 21, 2024 · 0 comments

Comments

@sesameman
Copy link

error code

using Symbolics
@variables ksqu zk zk2 mass qsqu
k = sqrt(ksqu) .* [0, sqrt(1-zk^2) * sqrt(1-zk2^2), zk2*sqrt(1-zk^2), zk]
q1 = [0, 0, 1, 0] .* sqrt(qsqu)
q2 = [0, 0, -(mass^2 + qsqu) / sqrt(qsqu) / 2,- im * (mass^2 + qsqu) / sqrt(qsqu) / 2]
println(simplify(dot(q2,q2)))
println(q2[4]*q2[4]+q2[3]*q2[3]+q2[2]*q2[2]+q2[1]*q2[1])

get return

((1//2)*((-qsqu - (mass^2))^2)) / (sqrt(qsqu)^2)
0.0

It has to have same output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant