-
-
Notifications
You must be signed in to change notification settings - Fork 30
Acos in matrix angle #100
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
Acos in matrix angle #100
Conversation
* restrict acos/asin for corrected type (samth) * improve matrix-cos-angle so * Real values are between -1 and 1 * Complex values have a magnitude at most (flnext 1.) * prevent early under/overflow * rescale matrix with inf values to a matrix of zero and ones (so it works similar to angle) * improve matrix-angle so type can be preserved * For real values use flacos * ok since Real values are now guaranteed to be within -1 to 1
Does this type check with the revised Typed Racket? |
It should (I think), while preparing this I shadowed
But I did not test both together. Will try to do that tomorrow. |
It seems to work as I wanted:
|
The |
I am okay with merging.
|
@bdeket is this ready to merge? @soegaard or @pavpanchekha, any thoughts? |
Hi, |
Looks good to me. Btw - in
why not use |
Thanks
|
@bdeket this broke the http://drdr.racket-lang.org/68985/cs/racket/share/pkgs/math-test/math/tests/matrix-tests.rkt test. Can you take a look? |
I Tested again on my (win) computer and for me all tests pass. |
possible alternative for fixing acos/asin (#99 )
matrix-basis-angle
based on corrected type of acos/asin (@samth ) (which errors since it depends onmatrix-basis-cos-angle
which is not implemented)matrix-cos-angle
so(flnext 1.)
matrix-angle
so original type can be preserved