From: kogeddes@daisy.uwaterloo.ca (Keith O. Geddes)
Subject: Re: Maple Problem : Error, (in normal/doit) floats not handled
Organization: University of Waterloo
Date: Tue, 15 Sep 1992 17:06:29 GMT

In article <BuMK21.75s@watdragon.uwaterloo.ca> katherle@daisy.uwaterloo.ca (Kate Atherley) writes:
>In article <1992Sep13.143621.1@ntuvax.ntu.ac.sg> mc1586217@ntuvax.ntu.ac.sg writes:
>>The following maple program was ran under DEC VMS and the last line gave the
>>following error :-
>>
>>Error, (in normal/doit) floats not handled
>:
>:
>>
>>Does anyone know what's the problem. Thank you.
>>
>
>This is a bug in the current version of Maple.  This has been fixed in
>the research version, and you can expect to see the fix in the 
>next release of Maple.  I include a session with the result of the
>calculation.
>
>Unfortunately, there is no patch for the current version.


Well, there is a work-around for Maple V which I would recommend.
Namely, the point is to avoid floating-point numbers in the matrices,
so simply convert them to rational numbers as seen in the session below.

============================================================================

    |\^/|      MAPLE V
._|\|   |/|_.  Copyright (c) 1981-1990 by the University of Waterloo.
 \  MAPLE  /   All rights reserved.  MAPLE is a registered trademark of
 <____ ____>   Waterloo Maple Software.
      |        Type ? for help.
> with(linalg):
Warning: new definition for   norm
Warning: new definition for   trace
> Q:=array(symmetric,1..3,1..3,[(1,1)=20.0,(1,2)=0.7,(1,3)=0.0,(2,2)=2.0,
> 							(2,3)=0.0,(3,3)=0.7]);
                                  [ 20.0   .7   0 ]
                                  [               ]
                             Q := [  .7   2.0   0 ]
                                  [               ]
                                  [   0    0   .7 ]

> m:=cos(theta);
                                m := cos(theta)

> n:=sin(theta);
                                n := sin(theta)

> T:=array(1..3,1..3,[(1,1)=m^2,(1,2)=n^2,(1,3)=2*m*n,(2,1)=n^2\
> ,(2,2)=m^2,(2,3)=-(2*m*n),(3,1)=-(m*n),(3,2)=m*n,(3,3)=(m^2-n^2)]);
               [           2            2                            ]
               [ cos(theta)   sin(theta)              2 %1           ]
               [                                                     ]
               [           2            2                            ]
          T := [ sin(theta)   cos(theta)             - 2 %1          ]
               [                                                     ]
               [                                     2             2 ]
               [     - %1          %1      cos(theta)  - sin(theta)  ]

%1 :=                       cos(theta) sin(theta)

#
# QUICK FIX:  convert all floating-point numbers to rationals in Q,
# and then (if desired) apply evalf to the final result.
#
> Q := map(convert, eval(Q), rational);
                                [  20   7/10    0  ]
                                [                  ]
                           Q := [ 7/10    2     0  ]
                                [                  ]
                                [   0     0   7/10 ]

> Qbar.k := evalm(inverse(T) &* Q);
Qbark :=

                       2               2                   2                2
         200 cos(theta)  + 7 sin(theta)        7 cos(theta)  + 20 sin(theta)
   [1/10 -------------------------------, 1/10 ------------------------------,
                        %1                                   %1

       - 7/5 %2]

                       2               2                   2                2
         200 sin(theta)  + 7 cos(theta)        7 sin(theta)  + 20 cos(theta)
   [1/10 -------------------------------, 1/10 ------------------------------,
                        %1                                   %1

       7/5 %2]

                                                  2             2
                193        13           cos(theta)  - sin(theta)
               [--- %2, - ---- %2, 7/10 -------------------------]
                 10        10                       %1

                      4               2           2             4
%1 :=       cos(theta)  + 2 cos(theta)  sin(theta)  + sin(theta)

                            cos(theta) sin(theta)
%2 :=                       ---------------------
                                      %1

#
# If desired, we can apply evalf to the resulting matrix.
#
> Qbar.k := map(evalf, eval(Qbar.k));
    . . .
    . . .  (output suppressed -- it is similar to above)
    . . .

> quit