/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1988-1995, by Sun Microsystems, Inc.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "base_conversion.h"
void
int n;
/* Right shift significand sticky by n bits. */
{
int i;
if (i >= UNPACKED_SIZE) {
return;
} else {
for (i = 0; i < (UNPACKED_SIZE - 1); i++)
pu->significand[i] = 0;
return;
}
}
while (n >= 32) { /* big shift */
for (i = UNPACKED_SIZE - 2; i >= 0; i--)
pu->significand[0] = 0;
n -= 32;
}
if (n >= 1) { /* small shift */
for (i = 0; i < UNPACKED_SIZE; i++) {
}
if (shiftout != 0)
}
}
PRIVATE int
int sign;
/* Returns 1 if overflow should go to infinity, 0 if to max finite. */
{
int inf;
switch (_fp_current_direction) {
case fp_nearest:
inf = 1;
break;
case fp_tozero:
inf = 0;
break;
case fp_positive:
break;
case fp_negative:
break;
}
return (inf);
}
PRIVATE void
/*
* Round according to current rounding mode. pu must be shifted to so that
* the roundbit is pu->significand[roundword] & 0x80000000
*/
{
int is;
* sticky bottom of
* roundword. */
break;
}
return;
switch (_fp_current_direction) {
case fp_nearest:
break;
case fp_tozero:
increment = 0;
break;
case fp_positive:
break;
case fp_negative:
break;
}
if (increment) {
do {
is--;
}
}
}
if ((_fp_current_direction == fp_nearest) && (pu->significand[roundword] == 0x80000000)) { /* ambiguous case */
}
}
void
{
case fp_zero:
break;
case fp_infinity:
break;
case fp_quiet:
break;
case fp_normal:
* normal */
goto ret;
}
goto ret;
}
}
goto infinity;
goto ret;
}
}
ret:
}
void
double *px; /* packed double */
{
case fp_zero:
kluge.f.significand2 = 0;
break;
case fp_infinity:
kluge.f.significand2 = 0;
break;
case fp_quiet:
break;
case fp_normal:
* normal */
kluge.f.significand2 = 0;
goto ret;
}
goto ret;
}
}
goto infinity;
goto ret;
}
break;
}
ret:
}
void
{
case fp_zero:
kluge.f.significand = 0;
kluge.f.significand2 = 0;
break;
case fp_infinity:
kluge.f.significand = 0;
kluge.f.significand2 = 0;
break;
case fp_quiet:
break;
case fp_normal:
switch (_fp_current_precision) {
case fp_single:
{
single s;
_pack_single(pu, &s);
_unpack_single(pu, &s);
break;
}
case fp_double:
{
double s;
_pack_double(pu, &s);
_unpack_double(pu, &s);
break;
}
}
goto ret;
}
goto infinity;
goto ret;
}
break;
}
ret:
}
void
{
int i;
case fp_zero:
kluge.f.significand2 = 0;
kluge.f.significand3 = 0;
kluge.f.significand4 = 0;
break;
case fp_infinity:
kluge.f.significand2 = 0;
kluge.f.significand3 = 0;
kluge.f.significand4 = 0;
break;
case fp_quiet:
break;
case fp_normal:
* normal */
kluge.f.significand2 = 0;
kluge.f.significand3 = 0;
kluge.f.significand4 = 0;
goto ret;
}
goto ret;
}
}
goto infinity;
goto ret;
}
break;
}
ret:
#ifdef __STDC__
#else
for (i = 0; i < 4; i++)
#endif
}