|
Math Products

GoFast® for PowerPC C Compilers
Fast Floating Point Library
Features
- Fast
- Reentrant
- ROMable
- Conforms to IEEE 754 Format
- Includes single and double precision
- "Link and Go" compiler support
- Includes startup code
- Includes complete source, test programs, and make file
Compiler Support
GoFast libraries are designed for “link and go” operation with each compiler. These
libraries provide the user with a significant speed advantage when no floating point
coprocessor hardware is available. This is of particular significance in real-time
embedded systems.
GoFast for PowerPC includes drop-in libraries for “link and go” seamless operation
with Diab Data, GNU, IBM, Metaware, and Freescale PowerPC C compilers.
The GoFast routines directly replace the compiler’s floating point runtime library
routines. Two types of interfaces are provided. The first is an emulator interface, which
uses a processor interrupt to pick up the floating-point instructions and emulate them in
software. Separate subdirectories in the GoFast distribution contain an emulator
specific to the PowerPC 602 and an emulator, which supports other variants of the PowerPC.
The second interface is through callable libraries. The product distribution contains
directories that are specific to each C compiler supported.
The Embedded Application Binary Interface (EABI) is supported for both Metaware and Diab Data
compilers and the emulator library interface is supported for the IBM compiler.
Functionality
GoFast contains the following floating point routines in both single and double precision:
- add, subtract, multiply, divide
- conversion operations
- compare operations
- sin, cos, tan
- asin, acos, atan, atan2
- sinh, cosh, atanh
- log, log10
- exp, pow
- floor, ceil, fabs
- modf, fmod, frexp, ldexp
Performance
GoFast delivers the optimized performance you can expect with PowerPC processor. The
following timings were measured using the GoFast EABI call library interface with a PPC 860T
processor running at 50 MHz (25 MHZ bus) and caching disabled. The benchmark program was
built with the Diab Data C compiler.
Microsecond Timings
| |
GoFast |
Diab Data |
| Function |
double |
single |
double |
single |
| add |
32.6 |
23.4 |
97.0 |
32.6 |
| subtract |
38.0 |
26.1 |
132.2 |
39.4 |
| multiply |
36.9 |
22.6 |
63.5 |
30.9 |
| divide |
61.2 |
30.0 |
413.1 |
131.9 |
| sqrt |
110.4 |
54.7 |
374.4 |
98.3 |
| exp |
221.3 |
68.9 |
1376.0 |
544.3 |
| log |
252.3 |
59.2 |
1475.1 |
585.9 |
| log10 |
264.9 |
61.9 |
1537.1 |
616.8 |
| sin |
177.7 |
58.4 |
614.9 |
439.6 |
| cos |
174.3 |
57.7 |
732.4 |
474.4 |
| tan |
283.1 |
66.5 |
1090.8 |
507.9 |
| asin |
329.7 |
105.6 |
1174.0 |
572.7 |
| acos |
394.0 |
126.8 |
1303.3 |
610.0 |
| atan |
209.7 |
61.2 |
1383.7 |
622.7 |
| atan 2 |
259.1 |
80.0 |
1988.0 |
842.7 |
| pow |
469.9 |
138.3 |
8575.7 |
3166.7 |
|