Fix math/matrix for new type of expt.
This commit is contained in:
parent
4afd6c86d0
commit
8a0c859d14
|
@ -238,8 +238,8 @@
|
|||
;; Compute this divided by the maximum to avoid underflow and overflow
|
||||
(define mx (array-all-max M))
|
||||
(cond [(and (rational? mx) (positive? mx))
|
||||
(* mx (expt (array-all-sum (inline-array-map (λ (x) (expt (abs (/ x mx)) p)) M))
|
||||
(/ p)))]
|
||||
(fl (* mx (expt (array-all-sum (inline-array-map (λ (x) (expt (abs (/ x mx)) p)) M))
|
||||
(/ p))))]
|
||||
[else mx]))))
|
||||
|
||||
(: matrix-norm (case-> ((Matrix Flonum) -> Nonnegative-Flonum)
|
||||
|
|
Loading…
Reference in New Issue
Block a user