Alternate Math (BC /FPa) Won't Always Produce Smaller .EXE's (58035)
This article was previously published under Q58035
SUMMARY
Using alternate math (BC /FPa) does not always produce smaller
executable files than using the emulator math library (BC /FPi) when
compiling with Microsoft Basic Compiler Versions 6.00 and 6.00b for
MS-DOS and MS OS/2 and Microsoft Basic Professional Development System
(PDS) Versions 7.00 and 7.10 for MS-DOS and MS OS/2.
Page 8 of the "Microsoft Basic Compiler 6.0: User's Guide" and Page
562 of the "Microsoft Basic 7.0: Programmer's Guide" (for 7.00 and
7.10) misleadingly state that "it [the alternate math library] also
creates a smaller executable file." Page 545 of the "Microsoft Basic
7.0: Programmer's Guide" misleadingly states that "alternate math is
an IEEE-compatible math package optimized for speed and size."
Although there is an initial space savings from using the alternate
math libraries, each individual floating-point calculation can take
more room using the alternate math library than the equivalent code
for the emulator math library. This means that as the code grows in
size, the initial space savings can be lost and the program can
actually be larger using the alternate math package.
NOTE: You will only notice a savings in the size of an executable
compiled /FPa versus /FPi if the program is also compiled with the /O
(stand-alone) option. If you compile as non stand alone with the
alternate math library (/FPa) option, the program will actually
contain both math libraries -- the compiled program will contain the
alternate math routines, while the Basic run-time module
(BRUN60Ax.EXE, BRUN61Ax.EXE, or BRT70Axx.EXE) will contain the
emulator math routines.
Modification Type: |
Minor |
Last Reviewed: |
1/8/2003 |
Keywords: |
KB58035 |
|