ida_ieee

IEEE floating point functions.

Attributes

SWIG_PYTHON_LEGACY_BOOL

FPVAL_NWORDS

number of words in fpvalue_t

FPV_BADARG

wrong value of max_exp

FPV_NORM

regular value

FPV_NAN

NaN.

FPV_PINF

positive infinity

FPV_NINF

negative infinity

REAL_ERROR_OK

no error

REAL_ERROR_FORMAT

realcvt: not supported format for current .idp

REAL_ERROR_RANGE

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

REAL_ERROR_BADDATA

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

REAL_ERROR_FPOVER

floating overflow or underflow

REAL_ERROR_BADSTR

asctoreal: illegal input string

REAL_ERROR_ZERODIV

ediv: divide by 0

REAL_ERROR_INTOVER

eetol*: integer overflow

cvar

MAXEXP_FLOAT

MAXEXP_DOUBLE

MAXEXP_LNGDBL

IEEE_EXONE

The exponent of 1.0.

E_SPECIAL_EXP

Exponent in fpvalue_t for NaN and Inf.

IEEE_NI

Number of 16 bit words in eNI.

IEEE_E

Array offset to exponent.

IEEE_M

Array offset to high guard word

EZERO

EONE

ETWO

Classes

fpvalue_shorts_array_t

fpvalue_t

Functions

ecleaz(→ None)

Module Contents

ida_ieee.SWIG_PYTHON_LEGACY_BOOL
class ida_ieee.fpvalue_shorts_array_t(data: unsigned short (&)[FPVAL_NWORDS])

Bases: object

thisown
data: unsigned short (&)[FPVAL_NWORDS]
bytes
ida_ieee.FPVAL_NWORDS

number of words in fpvalue_t

ida_ieee.FPV_BADARG

wrong value of max_exp

ida_ieee.FPV_NORM

regular value

ida_ieee.FPV_NAN

NaN.

ida_ieee.FPV_PINF

positive infinity

ida_ieee.FPV_NINF

negative infinity

ida_ieee.REAL_ERROR_OK

no error

ida_ieee.REAL_ERROR_FORMAT

realcvt: not supported format for current .idp

ida_ieee.REAL_ERROR_RANGE

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

ida_ieee.REAL_ERROR_BADDATA

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

ida_ieee.REAL_ERROR_FPOVER

floating overflow or underflow

ida_ieee.REAL_ERROR_BADSTR

asctoreal: illegal input string

ida_ieee.REAL_ERROR_ZERODIV

ediv: divide by 0

ida_ieee.REAL_ERROR_INTOVER

eetol*: integer overflow

class ida_ieee.fpvalue_t(*args)

Bases: object

thisown
w: uint16[8]
clear() None
compare(r: fpvalue_t) int
from_10bytes(fpval: void const *) fpvalue_error_t

Conversions for 10-byte floating point values.

to_10bytes(fpval: void *) fpvalue_error_t
from_12bytes(fpval: void const *) fpvalue_error_t

Conversions for 12-byte floating point values.

to_12bytes(fpval: void *) fpvalue_error_t
to_str(*args) None

Convert IEEE to string.

Parameters:
  • buf – the output buffer

  • bufsize – the size of the output buffer

  • mode – broken down into:

  • low byte: number of digits after ‘.’

  • second byte: FPNUM_LENGTH

  • third byte: FPNUM_DIGITS

from_sval(x: int) None

Convert integer to IEEE.

from_int64(x: int64) None
from_uint64(x: uint64) None
to_sval(round: bool = False) fpvalue_error_t

Convert IEEE to integer (+-0.5 if round)

to_int64(round: bool = False) fpvalue_error_t
to_uint64(round: bool = False) fpvalue_error_t
fadd(y: fpvalue_t) fpvalue_error_t

Arithmetic operations.

fsub(y: fpvalue_t) fpvalue_error_t
fmul(y: fpvalue_t) fpvalue_error_t
fdiv(y: fpvalue_t) fpvalue_error_t
mul_pow2(power_of_2: int) fpvalue_error_t

Multiply by a power of 2.

eabs() None

Calculate absolute value.

is_negative() bool

Is negative value?

negate() None

Negate.

get_kind() fpvalue_kind_t

Get value kind.

copy() fpvalue_t
static new_from_str(p: str) fpvalue_t
from_str(p: str) fpvalue_error_t

Convert string to IEEE.

assign(r: fpvalue_t) None
bytes
shorts
float
property sval
property int64
property uint64
ida_ieee.cvar
ida_ieee.MAXEXP_FLOAT
ida_ieee.MAXEXP_DOUBLE
ida_ieee.MAXEXP_LNGDBL
ida_ieee.IEEE_EXONE

The exponent of 1.0.

ida_ieee.E_SPECIAL_EXP

Exponent in fpvalue_t for NaN and Inf.

ida_ieee.IEEE_NI

Number of 16 bit words in eNI.

ida_ieee.IEEE_E

Array offset to exponent.

ida_ieee.IEEE_M

Array offset to high guard word

ida_ieee.ecleaz(x: eNI) None
ida_ieee.EZERO = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
ida_ieee.EONE = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xff?'
ida_ieee.ETWO = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00@'