*BSD News Article 10644


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA418 ; Sun, 31 Jan 93 14:07:16 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!dkuug!flshub!phk
From: phk@data.fls.dk (P-HK/Poul-Henning Kamp)
Newsgroups: comp.unix.bsd
Subject: [386bsd] PATCH: /usr/include/float.h
Message-ID: <1993Feb1.135236.9151@data.fls.dk>
Date: 1 Feb 93 13:52:36 GMT
Organization: FLS Data A/S, Valby, Copenhagen, Denmark.
Lines: 35

WHAT:
=====
This patch fixes DBL_MAX in /usr/include/float.h, which is too large.
I have grapped the value from enquire on a sun which also runs ieee format.

WHY:
====
scanf&friends have problems parsing this number, giving gcc-2.3.3 trouble
all over the place.

Please add to the patchkit.

Enjoy
Poul-Henning Kamp

*** /D/usr/src/sys.386bsd/i386/include/float.h	Tue Dec 24 23:23:38 1991
--- usr/src/sys.386bsd/i386/include/float.h	Sun Jan 31 18:29:46 1993
***************
*** 54,58 ****
  #define DBL_MIN_10_EXP	-307
  #define DBL_MAX_EXP	1024
! #define DBL_MAX		1.797693134862316E+308
  #define DBL_MAX_10_EXP	308
  
--- 54,58 ----
  #define DBL_MIN_10_EXP	-307
  #define DBL_MAX_EXP	1024
! #define DBL_MAX		1.7976931348623157E+308
  #define DBL_MAX_10_EXP	308
  
-- 
phk@data.fls.dk		  ||  The seven hazards of computing:
Poul-Henning Kamp	  ||  The hardware, the software, the supplier
FLS DATA A/S, Denmark	  ||  the application, the user, the operator
Phone: (+45) 36 18 12 35  ||  and the data.		Stan Kelly-Bootle