source: trunk/minix/lib/float/fef8.c@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 707 bytes
Line 
1/*
2 (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 See the copyright notice in the ACK home directory, in the file "Copyright".
4*/
5
6/* $Header: /cvsup/minix/src/lib/float/fef8.c,v 1.1.1.1 2005/04/21 14:56:11 beng Exp $ */
7
8/*
9 SEPERATE DOUBLE INTO EXPONENT AND FRACTION (FEF 8)
10*/
11
12#include "FP_types.h"
13
14void
15fef8(r, s1)
16DOUBLE s1;
17struct fef8_returns *r;
18{
19 EXTEND buf;
20 register struct fef8_returns *p = r; /* make copy, r might refer
21 to itself (see table)
22 */
23
24 extend(&s1.d[0],&buf,sizeof(DOUBLE));
25 if (buf.exp == 0 && buf.m1 == 0 && buf.m2 == 0) {
26 p->e = 0;
27 }
28 else {
29 p->e = buf.exp + 1;
30 buf.exp = -1;
31 }
32 compact(&buf,&p->f.d[0],sizeof(DOUBLE));
33}
Note: See TracBrowser for help on using the repository browser.