# Floating point support

The x86 decompiler supports floating point instructions. While everything works automatically, the following points are worth noting:

* The decompiler knows about all floating point types, including: **float, double, long double**, and **\_TBYTE** (the extended floating format used by x86 FPU). We introduced **\_TBYTE** because sizeof(long double) is often different from the size of **\_TBYTE**. While sizeof(long double) can be configured in the compiler settings, the size of **\_TBYTE** is always equal to 10 bytes.
* The decompiler performs FPU stack analysis, which is similar to the [simplex method](http://hexblog.com/2006/06/simplex_method_in_ida_pro.html) performed by IDA. If it fails, the decompiler represents FPU instructions using inline assembler statements. In this case the decompiler adds one more prefix column to the disassembly listing, next to the stack pointer values. This column shows the calculated state of the FPU stack and may help to determine where exactly the FPU stack tracing went wrong.
* Wrong prototypes of the called functions returning a value on the FPU stack may lead to a failure of the FPU stack analysis, leading to inline assembly as explain in the previous bullet point.
* The decompiler ignores all manipulations with the floating point control word. In practice this means that it may miss an unusual rounding mode.
* SSE floating point instructions are represented by [intrinsic functions](/core/decompiler/concepts/intrinsics.md). Scalar SSE instructions are however directly mapped to floating point operations in pseudocode.
* Casts from integers types to floating point types and vice versa are always displayed in the listing, even if the output has the same meaning without them.
* Feel free to report all anomalies and problems with floating point support using the [Send database](https://github.com/HexRaysSA/ida-docs/blob/9.3/ida-actions/hx_sendidb.md) command. This will help us to improve the decompiler and make it more robust. Thank you!

See also: [Failures and troubleshooting](/core/decompiler/failures.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/core/decompiler/concepts/fpu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
