BUG: FOR2932 Error in Round or Truncate of Extra DigitsLast reviewed: February 29, 1996Article ID: Q147758 |
The information in this article applies to:
SYMPTOMSThe following error message may be generated by the compiler when it initializes a REAL*4 variable with a constant near the maximum values allowed for REAL*4 numbers.
error FOR2932: single-precision REAL literal constant out of range STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe maximal values of single precision negative numbers is in the range of -3.4028235E+38 to -1.1754944E-38 and for single-precision positive numbers is in the range of +1.1754944E-38 to +3.4028235E+38. The following code demonstrates the problem.
Sample CodeC Compile options needed: none
real*4 x1 x1 = huge(1.0) write (*,100) x1 x1 = 3.402823466385288787198009999e38 ! in range here. write (*,100) x1 x1 = 3.4028234663852887871980100e38 ! out of range here. write (*,100) x1 x1 = 3.4028234663852887871989999e38 ! to here. write (*,100) x1 x1 = 3.4028234663852887871990e38 ! in range here write (*,100) x1 x1 = 3.4028234663852887871990099999999e38 ! to here. write (*,100) x1 x1 = 3.40282346638528878719901e38 ! then out of range here. write (*,100) x1100 format (e16.9) end |
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |