Improving Accuracy - Improving Accuracy - 2026.1 English - XD100

Vitis Tutorials: AI Engine Development (XD100)

Document ID
XD100
Release Date
2026-07-20
Version
2026.1 English

Although the IEEE 754 trick is computationally efficient, it can produce estimation errors up to 4 % of the true value. A method described in [3] restores accuracy by using all 64 bits and applying a correction function \(F\).

Begin by expressing the exponential function as:

\[ e^y = 2^{y/log(2)} = 2^{y_{i}} \cdot 2^{y_{f}} \approx 2^{y_{i}} \cdot \left( 1 + m - F \right), \]

where \(y_i\) and \(y_f\) are the integer and fractional parts of \(y/log(2)\), respectively. Define \(F = 1 + m - 2^{y_{f}}\). Given that \(m \equiv y_{f}\), rewrite \(F \left( y_{f} \right) = 1 + y_{f} - 2^{y_{f}}\). Model \(F \left( y_f \right)\) as a polynomial where \(y_f\) is defined over the range \([0, 1)\).

Estimate the exponential function by computing:

\[ I = \left\lfloor \frac{2^{52}}{log(2)} \left( y - log(2) F(y_f) \right) + 2^{52}x_0 \right\rfloor \]

Interpret (I) as a 64‑bit signed integer, then reinterpret the result as a double‑precision floating‑point value. Using all 64 bits requires a factor \(2^{52}\) to align the exponent field with IEEE 754 format.