1 /* $OpenBSD: ehead.h,v 1.1 2011/07/02 18:11:01 martynas Exp $ */ 2 3 /* 4 * Copyright (c) 2008 Stephen L. Moshier <steve@moshier.net> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /* Include file for extended precision arithmetic programs. 20 */ 21 22 /* Number of 16 bit words in external x type format */ 23 #define NE 10 24 25 /* Number of 16 bit words in internal format */ 26 #define NI (NE+3) 27 28 /* Array offset to exponent */ 29 #define E 1 30 31 /* Array offset to high guard word */ 32 #define M 2 33 34 /* Number of bits of precision */ 35 #define NBITS ((NI-4)*16) 36 37 /* Maximum number of decimal digits in ASCII conversion 38 * = NBITS*log10(2) 39 */ 40 #define NDEC (NBITS*8/27) 41 42 /* The exponent of 1.0 */ 43 #define EXONE (0x3fff) 44 45 void eadd(), esub(), emul(), ediv(); 46 int ecmp(), enormlz(), eshift(); 47 void eshup1(), eshup8(), eshup6(), eshdn1(), eshdn8(), eshdn6(); 48 void eabs(), eneg(), emov(), eclear(), einfin(), efloor(); 49 void eldexp(), efrexp(), eifrac(), ltoe(); 50 void esqrt(), elog(), eexp(), etanh(), epow(); 51 void asctoe(), asctoe24(), asctoe53(), asctoe64(); 52 void etoasc(), e24toasc(), e53toasc(), e64toasc(); 53 void etoe64(), etoe53(), etoe24(), e64toe(), e53toe(), e24toe(); 54 int mtherr(); 55 extern unsigned short ezero[], ehalf[], eone[], etwo[]; 56 extern unsigned short elog2[], esqrt2[]; 57 58 59 /* by Stephen L. Moshier. */ 60