floatdidf.c (c6879c6c14eedbd060ba588a3129a6c60ebbe783) | floatdidf.c (feb1d5507e4730fe401e6ae28a56579b814519ef) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This software was developed by the Computer Systems Engineering group 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and --- 52 unchanged lines hidden (view full) --- 61 62 /* 63 * Now u.ul[H] has the factor of 2^32 (or whatever) and u.ul[L] 64 * has the units. Ideally we could just set d, add LONG_BITS to 65 * its exponent, and then add the units, but this is portable 66 * code and does not know how to get at an exponent. Machine- 67 * specific code may be able to do this more efficiently. 68 */ | 1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This software was developed by the Computer Systems Engineering group 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and --- 52 unchanged lines hidden (view full) --- 61 62 /* 63 * Now u.ul[H] has the factor of 2^32 (or whatever) and u.ul[L] 64 * has the units. Ideally we could just set d, add LONG_BITS to 65 * its exponent, and then add the units, but this is portable 66 * code and does not know how to get at an exponent. Machine- 67 * specific code may be able to do this more efficiently. 68 */ |
69 d = (double)u.ul[H] * ((1 << (LONG_BITS - 2)) * 4.0); | 69 d = (double)u.ul[H] * ((1L << (LONG_BITS - 2)) * 4.0); |
70 d += u.ul[L]; 71 72 return (neg ? -d : d); 73} | 70 d += u.ul[L]; 71 72 return (neg ? -d : d); 73} |