Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Variables
Double.cpp File Reference
#include "nsString.h"
#include "txCore.h"
#include "XMLUtils.h"
#include <math.h>
#include <stdlib.h>
#include "prdtoa.h"

Go to the source code of this file.


class  txStringToDouble


#define TX_DOUBLE_HI32(x)   (((PRUint32 *)&(x))[0])
 Macros to workaround math-bugs bugs in various platforms.
#define TX_DOUBLE_LO32(x)   (((PRUint32 *)&(x))[1])
#define TX_DOUBLE_HI32_SIGNBIT   0x80000000
#define TX_DOUBLE_HI32_EXPMASK   0x7ff00000
#define TX_DOUBLE_HI32_MANTMASK   0x000fffff


const PRUint32 nanMask [2]
const PRUint32 infMask [2] = {0, TX_DOUBLE_HI32_EXPMASK}
const PRUint32 negInfMask [2] = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT}

Define Documentation

#define TX_DOUBLE_HI32 (   x)    (((PRUint32 *)&(x))[0])

Macros to workaround math-bugs bugs in various platforms.

Stefan Hanske reports: ARM is a little endian architecture but 64 bit double words are stored differently: the 32 bit words are in little endian byte order, the two words are stored in big endian`s way.

Definition at line 108 of file Double.cpp.

#define TX_DOUBLE_HI32_EXPMASK   0x7ff00000

Definition at line 115 of file Double.cpp.

#define TX_DOUBLE_HI32_MANTMASK   0x000fffff

Definition at line 116 of file Double.cpp.

#define TX_DOUBLE_HI32_SIGNBIT   0x80000000

Definition at line 114 of file Double.cpp.

#define TX_DOUBLE_LO32 (   x)    (((PRUint32 *)&(x))[1])

Definition at line 109 of file Double.cpp.

Variable Documentation

Definition at line 127 of file Double.cpp.

Initial value:

Definition at line 125 of file Double.cpp.

Definition at line 128 of file Double.cpp.