Find Docs

Astronomical Applications Department, U.S. Naval Observatory - Sensitivity Integral (Page 5)

Wodocs >> Science : Astronomy >> Astronomical Applications Department, U.S. Naval Observatory Sensitivity Integral Page 5
Astronomical Applications Department, U.S. Naval Observatory - Sensitivity Integral
# terms, then restore the temporaries.
debug_print(procname,`simplifying...`,0);
tmp := mess:
Tlist := []:
for i from 1 to nops(arglist) do
tmp := subs( arglist[i]=T.i, tmp );
Tlist := [op(Tlist),T.i];
od;
tmp := collect(tmp,[sin,cos,op(Tlist)],factor);
for i from 1 to nops(arglist) do
tmp := subs( T.i=arglist[i], tmp );
od;

debug_print( procname, `error check:`, 0,
factor(expand(tmp-mess)) );

# We're done.
tmp;
end:
Okay, here we go.
(
)
cleanup
,
indef x
cleanup[0]: number of unique sin/cos terms:
26
cleanup[0]: arg list:
- +
2 s
r
r g
- -
2 s
r
r g
+ +
2 s
r
r g
+ -
2 s
r
r g
-
s
r g
-
2 s
2 r g
+
2 s
2 r g
- +
r
r g
+
r
r g
,
,
,
,
,
,
,
,
,
[
+
s
r g 2 r g
-
2 s
2 r
-
s
r
+
2 s
2 r
+
s
r r g 2 s 2 r r s
,
,
,
,
,
,
,
,
, , ]
cleanup[0]: simplifying...
cleanup[2]: error check:
=
0
0
;
(
)
cost
(
)
rhs %
(
)
cost
(
)
rhs indef
+
+
+
297 additions
26 functions
764 multiplications
80 divisions
+
+
+
437 additions
26 functions
959 multiplications
240 divisions
Our efforts have paid off.
:=
indef
%%%
Now we will create a Maple procedure out of this result. (A Maple procedure is needed in order
to generate a fortran subroutine.) We first substitute for the
a
i
since the subscript notation will
cause Maple problems in what comes next.
:=
tmp
(
)
subs
,
(
)
seq
,
=
a
i
.
a i
=
i
..
0
4
(
)
rhs indef
readlib(optimize):
sensitivity_expr :=
(
)
optimize/makeproc
,
[
]
(
)
optimize
,
tmp tryhard
=
parameters
[
]
,
, , ,
x
(
)
seq
,
.
a i
=
i
..
0
4
s r g
The cost of the optimized expression sequence is
Page 5

<< Previous       1 2 3 4 5 6 7 8 9 10 11 12 13 14 15       Next >>



Other Documents:
3 D plot fits, lyap2, NAO 150, Rotate Vector, lyapcalc, wedges, Scifull, Precession Memo, Precession Maple, Curves 3 D, NOVAS 2004 Overview, NOVAS 2006 Overview, thesis, Ranson,


WODocs | |
All rights reserved. wodocs.com© 2009
WODocs


New Docs

Documents Category:
Arts (Design, Movies, Music, Radio, Television)
Automotive (Cars, Marine, Motorcycle, ATV, Snowmobiles)
Business (Biotechnology and Pharmaceuticals, Chemicals, Construction and Maintenance, Materials, Real Estate, Services)
Electronics (Computers, Motion Control, Power Supply)
Games (Board, Family, Party, Card, Construction, RC Toys)
Health (Animalm, Beauty, Healthcare, Medicine, Pharmacy, Surgery, Weight Loss)
Home (Accessories, Cooking, Decor and Design, Electrical, Family, Pets)
News (Newspapers, Sports, Television)
Recreation (Collecting, Hiking, Scouting, Survival, Travel)
Reference (Education, Libraries and Archives, Museums)
Science (Agriculture, Astronomy, Biology, Chemistry)
Shopping (Antiques and Collectibles, Clothing, Flowers, Food, Home and Garden)
Sports (Bicycle, Snowboard, Skiing, Other)