|
Math Products

GoFast® for ColdFire and Diab Data C/C++
Fast Floating Point Library
Features
- Fast
- Reentrant
- ROMable
- Conforms to IEEE 754 Format
- "Link and Go" compiler support for Diab Data C/C++
- Includes startup code
- Includes complete source, test programs, and make file
Description
GOFAST® for ColdFire was carefully designed for high performance operation and ease of use including "link and go" compatibility with the Diab Data C/C++ compiler.
GOFAST provides ROMable, reentrant IEEE and ANSI compatible ColdFire floating
point support.
Functionality
GOFAST supports reentrant floating point calculations for the Diab Data C/C++
compiler. GOFAST includes the following routines for both single and double precision in library format:
- intrinsic basic operations + - * /
- intrinsic conversions
- sqrt
- sin, cos, tan
- asin, acos, atan, atan2
- sinh, cosh, atanh
- log, log10
- exp, pow
- floor, ceil, fabs
- modf, fmod, frexp, ldexp
The following files are included in source format to support GOFAST testing.
- makefile - Sample makefile
- putchr.c - To read and display characters
- start.s - Skeleton startup
- suppa.s - Assembly support for putchr.c
- test1.c - Simple test program
Considerations
GOFAST is primarily designed to facilitate embedded operation. However, it is also
tuned for performance. The following table gives the timing of some floating point
operations, both with the Diab Data floating point library and the GOFAST floating point
library. The times, given in microseconds, were measured using a 25 MHz 5204 ColdFire
processor with three wait states. The version of Diab Data C/C++ compiler used was
4.1a.
Microsecond Timings
| |
Single Precision |
Double Precision |
| Function |
Diab Data |
GoFast |
Diab Data |
GoFast |
| add |
36.1 |
21.7 |
45.1 |
34.7 |
| subtract |
38.8 |
24.9 |
47.6 |
36.4 |
| multiply |
55.0 |
26.2 |
70.8 |
50.9 |
| divide |
92.2 |
86.5 |
188.4 |
172.8 |
| sqrt |
159.0 |
172.6 |
809.4 |
329.3 |
| exp |
665.5 |
61.9 |
1239.0 |
275.7 |
| log |
683.3 |
122.2 |
1341.9 |
380.7 |
| log10 |
740.0 |
127.1 |
1412.7 |
401.9 |
| sin |
607.5 |
60.3 |
1097.3 |
213.8 |
| cos |
639.3 |
56.8 |
1137.3 |
208.9 |
| tan |
585.5 |
131.7 |
1246.6 |
455.8 |
| asin |
676.4 |
352.1 |
1585.2 |
818.8 |
| acos |
714.4 |
420.1 |
1632.2 |
982.3 |
| atan |
730.8 |
124.7 |
1647.8 |
346.5 |
| atan 2 |
904.8 |
198.6 |
1944.0 |
509.0 |
| pow |
4241.8 |
197.1 |
5528.7 |
665.5 |
|