Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!gatech!purdue!decwrl!ucbvax!carleton.EDU!LLACROIX From: LLACROIX@carleton.EDU (Les LaCroix) Newsgroups: comp.os.vms Subject: Corrections to VAXCDEF.TLB(float) (ANSI float.h for VAX) ?? Message-ID: <8806051853.AA18489@ucbvax.Berkeley.EDU> Date: 31 May 88 21:51:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 23 I am using VAX C 2.3 and VMS 4.7. (VAX C 2.4 is here, and it does not address my problem, either.) Module 'float' in VAXCDEF.TLB contains macros described in the ANSI C draft. Many of the values are incorrect, especially the minimum, maximum and machine epsilon values. I am also dubious about the xxx_MANT_DIG symbols (for instance, FLT_MANT_DIG is 23 but a 'float' datum has "a normalized 24-bit fraction with the redundant most significant fraction bit not represented" (VAX Architecture Handbook, 1981). Further, none of the values vary depending on whether or not /G_FLOAT is used during compilation (which should change most of the DBL_xxxx macros). I have a version of float.h with definitions which expand to expressions with correct, _exact_ D_float values of DBL_MIN, DBL_MAX and DBL_EPSILON. (I have no need for the other macros at this time.) I would like to hear from anyone who has made corrections to this header, to discuss values and strategies. Then (if it hasn't already happened) I will post a version of float.h to the net which has some corrected values. Les LaCroix SPSS Inc, 402 Washington, Northfield MN USA 55057-2027 tel 507/663-1205 lacroix%spssnf@carleton.edu (CSnet) lacroix%spssnf.carleton.edu@relay.cs.net (BITNET) [(standard disclaimer) I do not represent my employer in this note.]