My Project
flt32.h
Go to the documentation of this file.
1 #ifndef __FLT32_H__
2 #define __FLT32_H__
3 
4 /*
5  * flt32.h - header for simple floating point functions.
6  *
7  * "Copyright (c) 2013 by Fritz Sieker."
8  *
9  * Permission to use, copy, modify, and distribute this software and its
10  * documentation for any purpose, without fee, and without written
11  * agreement is hereby granted, provided that the above copyright notice
12  * and the following two paragraphs appear in all copies of this software.
13  *
14  * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
15  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
16  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHOR
17  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18  *
19  * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
22  * BASIS, AND THE AUTHOR NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
23  * UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
24  */
25 
40 #define flt32 int
41 
46 int flt32_get_sign (flt32 x);
47 
52 int flt32_get_exp (flt32 x);
53 
58 int flt32_get_val (flt32 x);
59 
67 void flt32_get_all(flt32 x, int* sign, int*exp, int* val);
68 
75 
82 
89 flt32 flt32_add (flt32 x, flt32 y);
90 
97 flt32 flt32_sub (flt32 x, flt32 y);
98 
99 #endif
flt32 flt32_sub(flt32 x, flt32 y)
Definition: flt32.c:48
void flt32_get_all(flt32 x, int *sign, int *exp, int *val)
Definition: flt32.c:29
flt32 flt32_add(flt32 x, flt32 y)
Definition: flt32.c:43
#define flt32
Definition: flt32.h:40
flt32 flt32_negate(flt32 x)
Definition: flt32.c:38
int flt32_get_val(flt32 x)
Definition: flt32.c:24
int flt32_get_sign(flt32 x)
Definition: flt32.c:14
int flt32_get_exp(flt32 x)
Definition: flt32.c:19
flt32 flt32_abs(flt32 x)
Definition: flt32.c:33