CrystalLongMath.h File Reference

#include "CrystalBaseOps.h"

Go to the source code of this file.

Defines

#define BaseI20Div10(rSource, rDel, rOst)

Functions

i64 BaseCompose (u32 l, i32 h)
i32 BaseGetHigh (i64 x)
u32 BaseGetLow (i64 x)
i64 BaseMul (i32 x, i32 y)
i32 BaseMod (i64 x, i32 y)
i32 BaseDiv (i64 x, i32 y)
i64 BaseShrN (i64 x, i32 n)
i64 BaseShlN (i64 x, i32 n)
i32 BaseMulFraction (i32 x, i32 m, i32 d)
i64 BaseMulFractionDLong (i64 x, u32 ml, u32 dv)
i64 BaseMulAddDivDLong (i64 x, u32 ml, i64 y, u32 dv)
i64 BaseMulFractionLong (i32 x, i32 ml, i32 dv)
i64 BaseMulDiv64 (i64 x, i64 ml, i64 dv)


Define Documentation

#define BaseI20Div10 rSource,
rDel,
rOst   ) 
 

Value:

{ \
    uint sIn = (rSource); \
    uint rxs = (sIn * 3); \
    uint rxs2 = (rxs << 6) + (rxs << 2); \
    uint sRdel = ((rxs2 + sIn) >> 10) + (rxs2 << 2) + rxs; \
    sRdel = sRdel >> 13; \
    (rDel) = sRdel; \
    (rOst) = sIn - (sRdel*8) - (sRdel*2); \
}

Definition at line 340 of file CrystalLongMath.h.


Function Documentation

i64 BaseCompose u32  l,
i32  h
 

Definition at line 6 of file CrystalLongMath.h.

i32 BaseDiv i64  x,
i32  y
 

Definition at line 90 of file CrystalLongMath.h.

i32 BaseGetHigh i64  x  ) 
 

Definition at line 31 of file CrystalLongMath.h.

u32 BaseGetLow i64  x  ) 
 

Definition at line 47 of file CrystalLongMath.h.

i32 BaseMod i64  x,
i32  y
 

Calculates the remainder of the division of 64 bit number by 32 bit number

Parameters:
x (i) dividable
y (i) divisor
Returns:
result

Definition at line 73 of file CrystalLongMath.h.

i64 BaseMul i32  x,
i32  y
 

Definition at line 51 of file CrystalLongMath.h.

i64 BaseMulAddDivDLong i64  x,
u32  ml,
i64  y,
u32  dv
 

Definition at line 238 of file CrystalLongMath.h.

i64 BaseMulDiv64 i64  x,
i64  ml,
i64  dv
 

Definition at line 317 of file CrystalLongMath.h.

i32 BaseMulFraction i32  x,
i32  m,
i32  d
 

Definition at line 164 of file CrystalLongMath.h.

i64 BaseMulFractionDLong i64  x,
u32  ml,
u32  dv
 

Definition at line 176 of file CrystalLongMath.h.

i64 BaseMulFractionLong i32  x,
i32  ml,
i32  dv
 

Definition at line 298 of file CrystalLongMath.h.

i64 BaseShlN i64  x,
i32  n
 

Definition at line 146 of file CrystalLongMath.h.

i64 BaseShrN i64  x,
i32  n
 

Definition at line 105 of file CrystalLongMath.h.


Generated on Wed Dec 21 18:10:14 2005 for Crystal2 Platform by  doxygen 1.4.5