IEEE Number Range Correction for QB 4.0 "Learning and Using" (41086)






This article was previously published under Q41086

SUMMARY

The range for IEEE single and double precision numbers is correct in the "QuickBasic 4.0: Basic Language Reference" manual (Page 16), but is incorrect in the "QuickBasic 4.0: Learning and Using QuickBasic" manual (Page 248).

MORE INFORMATION

The IEEE floating-point ranges on Page 248 of the following manuals are incorrect:

  1. "Microsoft QuickBasic: Learning and Using" for QuickBasic Versions 4.00 and 4.00b.
  2. "Microsoft Basic Compiler: Learning and Using QuickBasic" for Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2.
The IEEE number range limits on Page 16 of the "Basic Language Reference" for QuickBasic Versions 4.00 and 4.00b and Basic compiler Versions 6.00 and 6.00b are correct (and agree with Page 337 of the "Programming in Basic" manual for QuickBasic Version 4.50).

The following is a sample test program:
' This program shows that the single precision limit as k goes to
' zero is k=1.40E-45. Change j# to j! to show the 3.40E+38 limit
' for single precision j!.
DEFSNG A-Z
j# = 1E+36
t:
j# = j# * 1.1
k = 1 / j#
PRINT j#, k
IF k = 0 THEN STOP
GOTO t
				

Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: KB41086