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

RFC: Some degree trigonometric functions, sind, cosd, tand, asind , acosd, asecd, acsd, acotd, atand accept a square matrix. #39758

Merged
merged 7 commits into from
May 16, 2021

Conversation

AtsushiSakai
Copy link
Contributor

@AtsushiSakai AtsushiSakai commented Feb 20, 2021

I improved some degree trigonometric functions, sind, cosd, tand, asind, acosd, asecd, acscd, acotd to accept an square matrix to fix #32876.
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).

@AtsushiSakai AtsushiSakai changed the title Some degree trigonometric functions, sind, cosd, tand, asind , acosd, asecd, acsd, acotd accept an square matrix. RFC: Some degree trigonometric functions, sind, cosd, tand, asind , acosd, asecd, acsd, acotd accept a square matrix. Feb 20, 2021
@ViralBShah ViralBShah added the maths Mathematical functions label Feb 21, 2021
@AtsushiSakai
Copy link
Contributor Author

I close/reopen to rerun CI.

@AtsushiSakai
Copy link
Contributor Author

I think the CI error is not related this PR.

Error During Test at /buildworker/worker/tester_linux32/build/share/julia/test/cmdlineargs.jl:211
  Test threw exception
  Expression: read(`$exename -e $code`, String) == string(cpu_threads)
  failed process: Process(`/buildworker/worker/tester_linux32/build/bin/julia -Cnative -J/buildworker/worker/tester_linux32/build/lib/julia/sys.so --depwarn=error --check-bounds=yes -g1 --startup-file=no --startup-file=no --color=no -e 'print(Threads.nthreads())'`, ProcessSignaled(11)) [0]
 

@ViralBShah
Copy link
Member

@StefanKarpinski @simonbyrne Could one of you (or someone else) take a look?

@AtsushiSakai
Copy link
Contributor Author

I fixed a conflict of News.md. PTAL.

@ViralBShah
Copy link
Member

I do want another set of eyes on this. Trying @dkarrasch @StefanKarpinski @simonbyrne.

@ViralBShah
Copy link
Member

Why do we not do this for all the trig functions? For example - atand?

@AtsushiSakai AtsushiSakai changed the title RFC: Some degree trigonometric functions, sind, cosd, tand, asind , acosd, asecd, acsd, acotd accept a square matrix. RFC: Some degree trigonometric functions, sind, cosd, tand, asind , acosd, asecd, acsd, acotd, atand accept a square matrix. May 15, 2021
@@ -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))
Copy link
Contributor Author

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))
Copy link
Contributor Author

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.

@ViralBShah ViralBShah merged commit b1a4129 into JuliaLang:master May 16, 2021
@AtsushiSakai AtsushiSakai deleted the issue_32876 branch May 17, 2021 09:57
shirodkara pushed a commit to shirodkara/julia that referenced this pull request Jun 9, 2021
…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 <[email protected]>
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
…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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maths Mathematical functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement degree trig functions on square matrices
2 participants