Find Docs

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

Wodocs >> Science : Astronomy >> Astronomical Applications Department, U.S. Naval Observatory Sensitivity Integral Page 16
Astronomical Applications Department, U.S. Naval Observatory - Sensitivity Integral
[0] cost before simplification:
+
+
+
+
87 additions
258 multiplications
32 divisions
26 functions
37 subscripts
[0] cost after simplification:
+
+
+
+
69 additions
185 multiplications
16 divisions
26 functions
29 subscripts
[0] error check:
0
Unfortunately, this simplification does not lead to more efficient results for parts[0..3].
Finally, combine the five parts of the integral.
:=
defint


collect
,
,
+


=
' '
k
0
3
parts
' '
k
tmp4 [
]
,
,
,
sin cos
1
2
factor
(
)
cost defint
+
+
+
+
1155 additions
3970 multiplications
320 divisions
64 functions
1080 subscripts
Surely we can do better than this. Employ the cleanup routine that we wrote near the end of
section 2
.
(
)
cleanup
,
,
defint
1
2
cleanup[0]: number of unique sin/cos terms:
64
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 r (
)
- +
1
g
r (
)
+
1
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[9]: error check:
0
(
)
cost %
+
+
+
+
885 additions
2287 multiplications
160 divisions
64 functions
1039 subscripts
:=
defint
=
(
)
S , , , ,
,
r s g T
1
2
%%
This is much better, though still somewhat bulky. Let's determine the cost of an optimized
expression sequence that would constitute the body of a fortran subroutine if we were to construct
one now.
(
)
cost
(
)
optimize
(
)
rhs defint
+
+
+
+
+
409 additions
632 multiplications
87 divisions
64 functions
148 subscripts
346 assignments
Compare this with the equivalent for the indefinite integration result (remember to multiply by
two).
2
(
)
cost
(
)
optimize
(
)
rhs indef
Page 16

<< Previous       1 .. 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23       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)