source: trunk/minix/lib/float/adf8.c@ 22

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

Minix 3.1.2a

File size: 613 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/adf8.c,v 1.1.1.1 2005/04/21 14:56:10 beng Exp $ */
7
8/*
9 ADD TWO FLOATS - DOUBLE (ADF 8)
10*/
11
12#include "FP_types.h"
13
14void
15adf8(s2,s1)
16DOUBLE s1,s2;
17{
18 EXTEND e1,e2;
19
20 if (s1.d[0] == 0 && s1.d[1] == 0) {
21 s1 = s2;
22 return;
23 }
24 if (s2.d[0] == 0 && s2.d[1] == 0) {
25 return;
26 }
27
28 extend(&s1.d[0],&e1,sizeof(DOUBLE));
29 extend(&s2.d[0],&e2,sizeof(DOUBLE));
30 add_ext(&e1,&e2);
31 compact(&e1,&s1.d[0],sizeof(DOUBLE));
32}
Note: See TracBrowser for help on using the repository browser.