| IDA SDK

Public Attributes | Public Member Functions | List of all members
fpvalue_t Struct Reference

## Detailed Description

Processor-independent representation of a floating point value.

IDA uses this structure to store and manipulate floating point values.

## Public Attributes
uint16 | w [FPVAL_NWORDS]

## Public Member Functions
void | clear (void)
fpvalue_error_t | from_half (uint16 fpval)
| Convert to the processor-independent representation.
fpvalue_error_t | from_float (float fpval)
fpvalue_error_t | from_double (double fpval)
fpvalue_error_t | to_half (uint16 *fpval) const
| Convert from the processor-independent representation.
fpvalue_error_t | to_float (float *fpval) const
fpvalue_error_t | to_double (double *fpval) const
fpvalue_error_t | from_10bytes (const void *fpval)
| Conversions for 10-byte floating point values.
fpvalue_error_t | to_10bytes (void *fpval) const
fpvalue_error_t | from_12bytes (const void *fpval)
| Conversions for 12-byte floating point values.
fpvalue_error_t | to_12bytes (void *fpval) const
fpvalue_error_t | from_str (const char **p_str)
| Convert string to IEEE. More...
void | to_str (char *buf, size_t bufsize, uint mode) const
| Convert IEEE to string. More...
void | from_sval (sval_t x)
| Convert integer to IEEE.
void | from_int64 (int64 x)
void | from_uint64 (uint64 x)
fpvalue_error_t | to_sval (sval_t *out, bool round=false) const
| Convert IEEE to integer (+-0.5 if round)
fpvalue_error_t | to_int64 (int64 *out, bool round=false) const
fpvalue_error_t | to_uint64 (uint64 *out, bool round=false) const
fpvalue_error_t | fadd (const fpvalue_t &y)
| Arithmetic operations.
fpvalue_error_t | fsub (const fpvalue_t &y)
fpvalue_error_t | fmul (const fpvalue_t &y)
fpvalue_error_t | fdiv (const fpvalue_t &y)
fpvalue_error_t | mul_pow2 (int32 power_of_2)
| Multiply by a power of 2.
void | eabs ()
| Calculate absolute value.
bool | is_negative () const
| Is negative value?
void | negate ()
| Negate.
fpvalue_kind_t | get_kind () const
| Get value kind.

## Member Function Documentation

## ◆ from_str()

fpvalue_error_t fpvalue_t::from_str | ( | const char ** | p_str | ) |
| inline

Convert string to IEEE.

Parameters

  p_str | pointer to pointer to string. it will advanced.

## ◆ to_str()

void fpvalue_t::to_str | ( | char * | buf,
|  | size_t | bufsize,
|  | uint | mode
| ) |  | const
| inline

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

The documentation for this struct was generated from the following file:

- ieee.h