strtof.c (187808) | strtof.c (219557) |
---|---|
1/**************************************************************** 2 3The author of this software is David M. Gay. 4 5Copyright (C) 1998, 2000 by Lucent Technologies 6All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and --- 15 unchanged lines hidden (view full) --- 24ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 25THIS SOFTWARE. 26 27****************************************************************/ 28 29/* Please send bug reports to David M. Gay (dmg at acm dot org, 30 * with " at " changed at "@" and " dot " changed to "."). */ 31 | 1/**************************************************************** 2 3The author of this software is David M. Gay. 4 5Copyright (C) 1998, 2000 by Lucent Technologies 6All Rights Reserved 7 8Permission to use, copy, modify, and distribute this software and --- 15 unchanged lines hidden (view full) --- 24ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 25THIS SOFTWARE. 26 27****************************************************************/ 28 29/* Please send bug reports to David M. Gay (dmg at acm dot org, 30 * with " at " changed at "@" and " dot " changed to "."). */ 31 |
32/* $FreeBSD: head/contrib/gdtoa/strtof.c 187808 2009-01-28 04:36:34Z das $ */ | 32/* $FreeBSD: head/contrib/gdtoa/strtof.c 219557 2011-03-12 07:03:06Z das $ */ |
33 34#include "gdtoaimp.h" 35 36 float 37#ifdef KR_headers 38strtof(s, sp) CONST char *s; char **sp; 39#else 40strtof(CONST char *s, char **sp) --- 13 unchanged lines hidden (view full) --- 54 k = strtodg(s, sp, fpi, &exp, bits); 55 switch(k & STRTOG_Retmask) { 56 case STRTOG_NoNumber: 57 case STRTOG_Zero: 58 u.L[0] = 0; 59 break; 60 61 case STRTOG_Normal: | 33 34#include "gdtoaimp.h" 35 36 float 37#ifdef KR_headers 38strtof(s, sp) CONST char *s; char **sp; 39#else 40strtof(CONST char *s, char **sp) --- 13 unchanged lines hidden (view full) --- 54 k = strtodg(s, sp, fpi, &exp, bits); 55 switch(k & STRTOG_Retmask) { 56 case STRTOG_NoNumber: 57 case STRTOG_Zero: 58 u.L[0] = 0; 59 break; 60 61 case STRTOG_Normal: |
62 u.L[0] = bits[0] & 0x7fffff | exp + 0x7f + 23 << 23; | 62 u.L[0] = (bits[0] & 0x7fffff) | ((exp + 0x7f + 23) << 23); |
63 break; 64 65 case STRTOG_NaNbits: 66 /* FreeBSD local: always return a quiet NaN */ 67 u.L[0] = bits[0] | 0x7fc00000; 68 break; 69 70 case STRTOG_Denormal: --- 14 unchanged lines hidden --- | 63 break; 64 65 case STRTOG_NaNbits: 66 /* FreeBSD local: always return a quiet NaN */ 67 u.L[0] = bits[0] | 0x7fc00000; 68 break; 69 70 case STRTOG_Denormal: --- 14 unchanged lines hidden --- |