.

.

.

Based on the Float32 routines

.

http://obex.parallax.com/objects/202/

.

Update: When we coded this up, did some optimizations, and tested it we found that a more realistic estimate is 628Hz@100MHz

.

.

Quantity+-*/cossinarcsinarccosarctan2sqrtquat*Sum

.

Moment162011340220352ops

.

Altitude3141000000211ops

.

Motor Speed14101810000004056ops

.

Sum181742223402245119ops

.

.

MHz+-*/cossinarcsinarccosarctan2sqrtquat*Sum

.

Operation Execution Time (MHz):804.74.810.513.297.793.2326.6331.7146.3217281.25

.

Moment4.728.8210145.2293.1372.80663.4292.60843.752854.35uS350.34Hz

.

Altitude14.14.84213.2000000562.5636.6uS1,570.85Hz

.

Motor Speed65.8481891320000086801302.8uS767.58Hz

.

Sum4793.75uS208.60Hz

.

.

MHz+-*/cossinarcsinarccosarctan2sqrtquat*Sum

.

Operation Execution Time Adjustable (MHz)1003.763.848.410.5678.1674.56261.28265.36117.04173.6225With Moment and Altitude Parallelization

.

Moment3.7623.04168116.16234.48298.240530.72234.0806752283.48uS437.93Hz2283.48

.

Altitude11.283.8433.610.56000000450509.28uS1,963.56HzuS

.

Motor Speed52.6438.4151.2105.600000694.401042.24uS959.47Hz1042.24uS

.

Sum67.6865.28352.8232.32234.48298.240530.72234.08694.411253835uS260.76Hz3325.72300.686768579435Hz

.

.

.

+-*/cossinarcsinarccosarctan2sqrtquat*FFloatFTruncFCmpPackUnpackExtra

.

Extra(uses sin)(uses asin)Estimate(estimate)Code Size Totals

.

Code Size (longs)42461819245365252815131722254230Math Ops w/ extraSupportOps + Support

.

28309863146104933027131722254230433119552

.

3610342300000023131722254230156119275

.

8046905900000440131722254230Sum w/o dup.349119468

.

9674186107146136133344351317222542308489383571295

.

Note: The Extra field is the number of additional longs for each call to a math op (ie, setup and calling costs). It is adjustable

.

Note: Some functions may rely on other operations, eg cos relies on sin. This may not be reflected (although acos does it correctly)