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

return values of sin and cos #101

Closed
stevengj opened this issue Aug 31, 2022 · 2 comments
Closed

return values of sin and cos #101

stevengj opened this issue Aug 31, 2022 · 2 comments

Comments

@stevengj
Copy link
Member

This seems inconsistent:

julia> cos(A)
4×4 Symmetric{Float64, Matrix{Float64}}:
 36765.0    36532.0    10744.7      537.235
 36532.0    41062.9    -5909.58    8595.76
 10744.7    -5909.58   60940.6   -27936.2
   537.235   8595.76  -27936.2    13663.9

julia> sin(A)
4×4 Matrix{Float64}:
      0.0   13228.5  -46097.2          22406.2
 -13228.5       0.0  -49673.4          22070.7
  46097.2   49673.4       1.81899e-12   7221.87
 -22406.2  -22070.7   -7221.87             5.68434e-14

julia> cosh(A)
4×4 Hermitian{Float64, Matrix{Float64}}:
 0.766512      0.0374       0.011        0.000550001
 0.0374        0.770912    -0.00605001   0.00880001
 0.011        -0.00605001   0.791262    -0.0286
 0.000550001   0.00880001  -0.0286       0.742862

julia> sinh(A)
4×4 SkewHermitian{Float64, Matrix{Float64}}:
  0.0       -0.167402  0.555537   0.272569
  0.167402   0.0       0.183709  -0.585157
 -0.555537  -0.183709  0.0       -0.174807
 -0.272569   0.585157  0.174807   0.0

Why doesn't cos return Hermitian and sin return SkewHermitian?

@stevengj
Copy link
Member Author

stevengj commented Aug 31, 2022

Similarly for tan and tanh and the other trig functions.

@smataigne
Copy link
Collaborator

I solved this issue in #109

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

2 participants