Kannel: Open Source WAP and SMS gateway
svn-r5336
|
#include "wsint.h"
Go to the source code of this file.
Macros | |
#define | WS_IEEE754_SINGLE_EXP_SIZE 8 |
#define | WS_IEEE754_SINGLE_MANT_SIZE 23 |
#define | WS_IEEE754_SINGLE_BIAS 127 |
#define | WS_IEEE754_SINGLE_EXP_MIN -126 |
#define | WS_IEEE754_SINGLE_EXP_MAX 127 |
#define | WS_IEEE754_POSITIVE_INFINITY 0x7f800000 |
Functions | |
WsIeee754Result | ws_ieee754_encode_single (double value, unsigned char *buf) |
WsIeee754Result | ws_ieee754_decode_single (unsigned char *buf, double *value_return) |
WsUInt32 | ws_ieee754_single_get_sign (unsigned char *buf) |
WsUInt32 | ws_ieee754_single_get_exp (unsigned char *buf) |
WsUInt32 | ws_ieee754_single_get_mant (unsigned char *buf) |
Variables | |
unsigned char | ws_ieee754_nan [4] = {0xff, 0xff, 0xff, 0xff} |
unsigned char | ws_ieee754_positive_inf [4] = {0x7f, 0x80, 0x00, 0x00} |
unsigned char | ws_ieee754_negative_inf [4] = {0xff, 0x80, 0x00, 0x00} |
#define WS_IEEE754_POSITIVE_INFINITY 0x7f800000 |
Definition at line 82 of file wsieee754.c.
#define WS_IEEE754_SINGLE_BIAS 127 |
Definition at line 77 of file wsieee754.c.
Referenced by ws_ieee754_decode_single(), and ws_ieee754_encode_single().
#define WS_IEEE754_SINGLE_EXP_MAX 127 |
Definition at line 80 of file wsieee754.c.
Referenced by ws_ieee754_encode_single().
#define WS_IEEE754_SINGLE_EXP_MIN -126 |
Definition at line 79 of file wsieee754.c.
Referenced by ws_ieee754_encode_single().
#define WS_IEEE754_SINGLE_EXP_SIZE 8 |
Definition at line 75 of file wsieee754.c.
#define WS_IEEE754_SINGLE_MANT_SIZE 23 |
Definition at line 76 of file wsieee754.c.
Referenced by ws_ieee754_decode_single(), and ws_ieee754_encode_single().
WsIeee754Result ws_ieee754_decode_single | ( | unsigned char * | buf, |
double * | value_return | ||
) |
Definition at line 199 of file wsieee754.c.
References WS_IEEE754_NAN, WS_IEEE754_NEGATIVE_INF, WS_IEEE754_OK, WS_IEEE754_POSITIVE_INF, WS_IEEE754_SINGLE_BIAS, ws_ieee754_single_get_exp(), ws_ieee754_single_get_mant(), ws_ieee754_single_get_sign(), and WS_IEEE754_SINGLE_MANT_SIZE.
Referenced by ws_bc_decode().
WsIeee754Result ws_ieee754_encode_single | ( | double | value, |
unsigned char * | buf | ||
) |
Definition at line 94 of file wsieee754.c.
References gw_assert(), WS_IEEE754_NEGATIVE_INF, WS_IEEE754_OK, WS_IEEE754_POSITIVE_INF, WS_IEEE754_SINGLE_BIAS, WS_IEEE754_SINGLE_EXP_MAX, WS_IEEE754_SINGLE_EXP_MIN, and WS_IEEE754_SINGLE_MANT_SIZE.
Referenced by read_float_from_exp(), and ws_bc_encode().
WsUInt32 ws_ieee754_single_get_exp | ( | unsigned char * | buf | ) |
WsUInt32 ws_ieee754_single_get_mant | ( | unsigned char * | buf | ) |
WsUInt32 ws_ieee754_single_get_sign | ( | unsigned char * | buf | ) |
Definition at line 256 of file wsieee754.c.
Referenced by ws_ieee754_decode_single().
unsigned char ws_ieee754_nan[4] = {0xff, 0xff, 0xff, 0xff} |
Definition at line 86 of file wsieee754.c.
Referenced by ws_bc_encode().
unsigned char ws_ieee754_negative_inf[4] = {0xff, 0x80, 0x00, 0x00} |
Definition at line 90 of file wsieee754.c.
Referenced by ws_bc_encode().
unsigned char ws_ieee754_positive_inf[4] = {0x7f, 0x80, 0x00, 0x00} |
Definition at line 88 of file wsieee754.c.
Referenced by ws_bc_encode().