Module index

# Module `ida_ieee`

IEEE floating point functions.

## Global variables

`var E_SPECIAL_EXP`

  Exponent in fpvalue_t for NaN and Inf.

`var FPVAL_NWORDS`

  number of words in fpvalue_t

`var FPV_BADARG`

  wrong value of max_exp

`var FPV_NAN`

  NaN.

`var FPV_NINF`

  negative infinity

`var FPV_NORM`

  regular value

`var FPV_PINF`

  positive infinity

`var IEEE_E`

  Array offset to exponent.

`var IEEE_EXONE`

  The exponent of 1.0.

`var IEEE_M`

  Array offset to high guard word

`var IEEE_NI`

  Number of 16 bit words in eNI.

`var MAXEXP_DOUBLE`

  maximum exponent for 64-bit double

`var MAXEXP_FLOAT`

  maximum exponent for 32-bit float

`var MAXEXP_LNGDBL`

  maximum exponent for 80-bit long double

`var REAL_ERROR_BADDATA`

  realcvt: illegal real data for load (IEEE data not filled)

`var REAL_ERROR_BADSTR`

  asctoreal: illegal input string

`var REAL_ERROR_FORMAT`

  realcvt: not supported format for current .idp

`var REAL_ERROR_FPOVER`

  floating overflow or underflow

`var REAL_ERROR_INTOVER`

  eetol*: integer overflow

`var REAL_ERROR_OK`

  no error

`var REAL_ERROR_RANGE`

  realcvt: number too big (small) for store (mem NOT modified)

`var REAL_ERROR_ZERODIV`

  ediv: divide by 0

## Functions

`def ecleaz(x: eNI)`

  ecleaz(x)

  @param x: unsigned short [(8+3)]

## Classes

`class fpvalue_shorts_array_t (data: unsigned short (&)[FPVAL_NWORDS])`

  Proxy of C++ wrapped_array_t< uint16,FPVAL_NWORDS > class.

  init(self, data) -> fpvalue_shorts_array_t

  @param data: unsigned short (&)[FPVAL_NWORDS]

  ### Instance variables

  `var bytes : bytevec_t`

    _get_bytes(self) -> bytevec_t

  `var data : unsigned short (&)[FPVAL_NWORDS]`

    data

  `var thisown`

    The membership flag

`class fpvalue_t (*args)`

  Proxy of C++ fpvalue_t class.

  init(self) -> fpvalue_t init(self, _in) -> fpvalue_t

  @param in: bytevec16_t const &

  ### Instance variables

  `var bytes : void`

    _get_bytes(self)

  `var float : double`

    _get_float(self) -> double

  `var int64`
  `var shorts : wrapped_array_t< uint16,FPVAL_NWORDS >`

    _get_shorts(self) -> fpvalue_shorts_array_t

  `var sval`
  `var thisown`

    The membership flag

  `var uint64`
  `var w : uint16 [8]`

    w

  ### Methods

  `def assign(self, r: fpvalue_t)`

    assign(self, r)

    @param r: fpvalue_t const &

  `def clear(self)`

    clear(self)

  `def compare(self, r: fpvalue_t) ‑> int`

    compare(self, r) -> int

    @param r: fpvalue_t const &

  `def copy(self) ‑> fpvalue_t`

    copy(self) -> fpvalue_t

  `def eabs(self)`

    eabs(self) Calculate absolute value.

  `def fadd(self, y: fpvalue_t)`

    fadd(self, y) -> fpvalue_error_t Arithmetic operations.

    @param y: (C++: const fpvalue_t &) fpvalue_t const &

  `def fdiv(self, y: fpvalue_t)`

    fdiv(self, y) -> fpvalue_error_t

    @param y: fpvalue_t const &

  `def fmul(self, y: fpvalue_t)`

    fmul(self, y) -> fpvalue_error_t

    @param y: fpvalue_t const &

  `def from_10bytes(self, fpval: void const *)`

    from_10bytes(self, fpval) -> fpvalue_error_t Conversions for 10-byte floating point values.

    @param fpval: (C++: const void *) void const *

  `def from_12bytes(self, fpval: void const *)`

    from_12bytes(self, fpval) -> fpvalue_error_t Conversions for 12-byte floating point values.

    @param fpval: (C++: const void *) void const *

  `def from_int64(self, x: int64)`

    from_int64(self, x)

    @param x: int64

  `def from_str(self, p: char const *)`

    from_str(self, p) -> fpvalue_error_t Convert string to IEEE.

    @param p_str: (C++: const char **) pointer to pointer to string. it will advanced.

  `def from_sval(self, x: sval_t)`

    from_sval(self, x) Convert integer to IEEE.

    @param x: (C++: sval_t)

  `def from_uint64(self, x: uint64)`

    from_uint64(self, x)

    @param x: uint64

  `def fsub(self, y: fpvalue_t)`

    fsub(self, y) -> fpvalue_error_t

    @param y: fpvalue_t const &

  `def get_kind(self)`

    get_kind(self) -> fpvalue_kind_t Get value kind.

  `def is_negative(self) ‑> bool`

    is_negative(self) -> bool Is negative value?

  `def mul_pow2(self, power_of_2: int32)`

    mul_pow2(self, power_of_2) -> fpvalue_error_t Multiply by a power of 2.

    @param power_of_2: (C++: int32)

  `def negate(self)`

    negate(self) Negate.

  `def to_10bytes(self, fpval: void *)`

    to_10bytes(self, fpval) -> fpvalue_error_t

    @param fpval: void *

  `def to_12bytes(self, fpval: void *)`

    to_12bytes(self, fpval) -> fpvalue_error_t

    @param fpval: void *

  `def to_int64(self, round: bool = False)`

    to_int64(self, round=False) -> fpvalue_error_t

    @param round: bool

  `def to_str(self, *args)`

    to_str(self, mode) Convert IEEE to string.

    @param mode: (C++: uint) broken down into: * low byte: number of digits after '.' * second byte: FPNUM_LENGTH * third byte: FPNUM_DIGITS

  `def to_sval(self, round: bool = False)`

    to_sval(self, round=False) -> fpvalue_error_t Convert IEEE to integer (+-0.5 if round)

    @param round: (C++: bool)

  `def to_uint64(self, round: bool = False)`

    to_uint64(self, round=False) -> fpvalue_error_t

    @param round: bool