-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: Some degree trigonometric functions, sind
, cosd
, tand
, asind
, acosd
, asecd
, acsd
, acotd
, atand
accept a square matrix.
#39758
Conversation
… `acosd`, `asecd`, `acsd`, `acotd` accept an square matrix.
sind
, cosd
, tand
, asind
, acosd
, asecd
, acsd
, acotd
accept an square matrix.sind
, cosd
, tand
, asind
, acosd
, asecd
, acsd
, acotd
accept a square matrix.
I close/reopen to rerun CI. |
I think the CI error is not related this PR.
|
@StefanKarpinski @simonbyrne Could one of you (or someone else) take a look? |
I fixed a conflict of News.md. PTAL. |
I do want another set of eyes on this. Trying @dkarrasch @StefanKarpinski @simonbyrne. |
Why do we not do this for all the trig functions? For example - |
sind
, cosd
, tand
, asind
, acosd
, asecd
, acsd
, acotd
accept a square matrix.sind
, cosd
, tand
, asind
, acosd
, asecd
, acsd
, acotd
, atand
accept a square matrix.
@@ -1294,5 +1302,5 @@ end | |||
|
|||
Compute the inverse tangent of `y` or `y/x`, respectively, where the output is in degrees. | |||
""" | |||
atand(y) = rad2deg(atan(y)) | |||
atand(y, x) = rad2deg(atan(y,x)) | |||
atand(y) = rad2deg.(atan(y)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ViralBShah Thank you for your comment. The PR title and news.md was missing atand
, but it supports a square matrix by this change.
@test tand(TAA) == tan(deg2rad.(TAA)) | ||
@test asind(TAA) == rad2deg.(asin(TAA)) | ||
@test acosd(TAA) == rad2deg.(acos(TAA)) | ||
@test atand(TAA) == rad2deg.(atan(TAA)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ViralBShah atand
is tested here.
…ind` , `acosd`, `asecd`, `acsd`, `acotd`, `atand` accept a square matrix. (JuliaLang#39758) * Some degree trigonometric functions, `sind`, `cosd`, `tand`, `asind`, `acosd`, `asecd`, `acsd`, `acotd` accept an square matrix. * add PR number and change argument name to be the same as in the document. * Update NEWS.md * add `atand` for News.md. Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
…ind` , `acosd`, `asecd`, `acsd`, `acotd`, `atand` accept a square matrix. (JuliaLang#39758) * Some degree trigonometric functions, `sind`, `cosd`, `tand`, `asind`, `acosd`, `asecd`, `acsd`, `acotd` accept an square matrix. * add PR number and change argument name to be the same as in the document. * Update NEWS.md * add `atand` for News.md. Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
I improved some degree trigonometric functions,
sind
,cosd
,tand
,asind
,acosd
,asecd
,acscd
,acotd
to accept an square matrix to fix JuliaLang/LinearAlgebra.jl#651.Also, I added some tests, updated docs of these functions, updated NEWS.md, and generalized a unit convert function as a for loop element which is proposed in #27254 (comment).