Skip to content

Commit

Permalink
Restrict types related to acos/asin.
Browse files Browse the repository at this point in the history
  • Loading branch information
samth committed Jan 16, 2025
1 parent f69552c commit 425d3aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions math-lib/math/private/matrix/matrix-basic.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,7 @@
(define (matrix-cos-angle M N)
(/ (matrix-dot M N) (* (matrix-2norm M) (matrix-2norm N))))

(: matrix-angle (case-> ((Matrix Flonum) (Matrix Flonum) -> Flonum)
((Matrix Real) (Matrix Real) -> Real)
((Matrix Float-Complex) (Matrix Float-Complex) -> Float-Complex)
(: matrix-angle (case-> ((Matrix Float-Complex) (Matrix Float-Complex) -> Float-Complex)
((Matrix Number) (Matrix Number) -> Number)))
(define (matrix-angle M N)
(acos (matrix-cos-angle M N)))
Expand Down
4 changes: 1 addition & 3 deletions math-lib/math/private/matrix/matrix-operator-norm.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ See "How to Measure Errors" in the LAPACK manual for more details:
;(matrix-min-singular-value (matrix* (matrix-hermitian M) R))
(error 'unimplemented))

(: matrix-basis-angle (case-> ((Matrix Flonum) (Matrix Flonum) -> Flonum)
((Matrix Real) (Matrix Real) -> Real)
((Matrix Float-Complex) (Matrix Float-Complex) -> Float-Complex)
(: matrix-basis-angle (case-> ((Matrix Float-Complex) (Matrix Float-Complex) -> Float-Complex)
((Matrix Number) (Matrix Number) -> Number)))
;; Returns the angle between the two subspaces spanned by the two given sets of column vectors
(define (matrix-basis-angle M R)
Expand Down

0 comments on commit 425d3aa

Please sign in to comment.