From 8a0c859d14763c93a21f133ec60adc63ec883cec Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 5 Nov 2014 10:21:29 -0500 Subject: [PATCH] Fix math/matrix for new type of expt. --- pkgs/math-pkgs/math-lib/math/private/matrix/matrix-basic.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/math-pkgs/math-lib/math/private/matrix/matrix-basic.rkt b/pkgs/math-pkgs/math-lib/math/private/matrix/matrix-basic.rkt index 0bf2993886..f524590f5f 100644 --- a/pkgs/math-pkgs/math-lib/math/private/matrix/matrix-basic.rkt +++ b/pkgs/math-pkgs/math-lib/math/private/matrix/matrix-basic.rkt @@ -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)