fcnvff.c (7eec34da) fcnvff.c (5b133f3f)
1/* $OpenBSD: fcnvff.c,v 1.7 2003/04/10 17:27:58 mickey Exp $ */
1/* $OpenBSD: fcnvff.c,v 1.8 2023/03/08 04:43:07 guenther Exp $ */
2/*
3 (c) Copyright 1986 HEWLETT-PACKARD COMPANY
4 To anyone who acknowledges that this file is provided "AS IS"
5 without any express or implied warranty:
6 permission to use, copy, modify, and distribute this file
7 for any purpose is hereby granted without fee, provided that
8 the above copyright notice and this notice appears in all
9 copies, and that the name of Hewlett-Packard Company not be

--- 7 unchanged lines hidden (view full) ---

17#include "float.h"
18#include "sgl_float.h"
19#include "dbl_float.h"
20#include "cnv_float.h"
21
22/*
23 * Single Floating-point to Double Floating-point
24 */
2/*
3 (c) Copyright 1986 HEWLETT-PACKARD COMPANY
4 To anyone who acknowledges that this file is provided "AS IS"
5 without any express or implied warranty:
6 permission to use, copy, modify, and distribute this file
7 for any purpose is hereby granted without fee, provided that
8 the above copyright notice and this notice appears in all
9 copies, and that the name of Hewlett-Packard Company not be

--- 7 unchanged lines hidden (view full) ---

17#include "float.h"
18#include "sgl_float.h"
19#include "dbl_float.h"
20#include "cnv_float.h"
21
22/*
23 * Single Floating-point to Double Floating-point
24 */
25/*ARGSUSED*/
26int
27sgl_to_dbl_fcnvff(srcptr, null, dstptr, status)
28 sgl_floating_point *srcptr, *null;
29 dbl_floating_point *dstptr;
30 unsigned int *status;
31{
32 register unsigned int src, resultp1, resultp2;
33 register int src_exponent;

--- 69 unchanged lines hidden (view full) ---

103 Sgl_to_dbl_mantissa(Sgl_mantissa(src), resultp1,resultp2);
104 Dbl_copytoptr(resultp1,resultp2,dstptr);
105 return(NOEXCEPTION);
106}
107
108/*
109 * Double Floating-point to Single Floating-point
110 */
25int
26sgl_to_dbl_fcnvff(srcptr, null, dstptr, status)
27 sgl_floating_point *srcptr, *null;
28 dbl_floating_point *dstptr;
29 unsigned int *status;
30{
31 register unsigned int src, resultp1, resultp2;
32 register int src_exponent;

--- 69 unchanged lines hidden (view full) ---

102 Sgl_to_dbl_mantissa(Sgl_mantissa(src), resultp1,resultp2);
103 Dbl_copytoptr(resultp1,resultp2,dstptr);
104 return(NOEXCEPTION);
105}
106
107/*
108 * Double Floating-point to Single Floating-point
109 */
111/*ARGSUSED*/
112int
113dbl_to_sgl_fcnvff(srcptr, null, dstptr, status)
114 dbl_floating_point *srcptr, *null;
115 sgl_floating_point *dstptr;
116 unsigned int *status;
117{
118 register unsigned int srcp1, srcp2, result;
119 register int src_exponent, dest_exponent, dest_mantissa;

--- 168 unchanged lines hidden ---
110int
111dbl_to_sgl_fcnvff(srcptr, null, dstptr, status)
112 dbl_floating_point *srcptr, *null;
113 sgl_floating_point *dstptr;
114 unsigned int *status;
115{
116 register unsigned int srcp1, srcp2, result;
117 register int src_exponent, dest_exponent, dest_mantissa;

--- 168 unchanged lines hidden ---