# Control floating-point accuracy modes in Arm Performance Libraries

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/multi-accuracy-libamath/)
- [Floating-point representation](https://learn.arm.com/learning-paths/servers-and-cloud-computing/multi-accuracy-libamath/floating-point-rep/)
- [Units in the last place (ULP)](https://learn.arm.com/learning-paths/servers-and-cloud-computing/multi-accuracy-libamath/ulp/)
- [ULP error and accuracy](https://learn.arm.com/learning-paths/servers-and-cloud-computing/multi-accuracy-libamath/ulp-error/)
- [Accuracy modes in Libamath](https://learn.arm.com/learning-paths/servers-and-cloud-computing/multi-accuracy-libamath/multi-accuracy/)
- [Arm Performance Libraries example](https://learn.arm.com/learning-paths/servers-and-cloud-computing/multi-accuracy-libamath/examples/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/multi-accuracy-libamath/_next-steps/)

## About this Learning Path

| Skill level:     | Introductory        |
|------------------|---------------------|
| Reading time:    | 20 min              |
| Last updated:    | 29 Sep 2026         |

| Author:          | Joana Cruz          |
|------------------|---------------------|
| Arm IP:          | [Neoverse](https://support.arm.com/?tab=compute-ip&Product%20Type=Infrastructure%20Processors) |
| Tags:            | [Performance and Architecture](https://learn.arm.com/tag/performance-and-architecture), [Linux](https://learn.arm.com/tag/linux), [Arm Performance Libraries](https://learn.arm.com/tag/arm-performance-libraries), [GCC](https://learn.arm.com/tag/gcc), [Libamath](https://learn.arm.com/tag/libamath) |

### Who is this for?
This is an introductory topic for developers who want to use the different accuracy modes for vectorized math functions in Libamath, a component of Arm Performance Libraries.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Understand how accuracy is defined and measured in Libamath.
- Select an appropriate accuracy mode for your application.
- Use Libamath with different vector accuracy modes in practice.

### Prerequisites
Before starting, you will need the following:
- An Arm computer running Linux with [Arm Performance Libraries](https://learn.arm.com/install-guides/armpl/) version 25.04 or newer installed.

### Summary
You’ll control floating-point accuracy for Libamath vector functions in Arm Performance Libraries. First, you’ll review IEEE 754 representation and Units in the Last Place (ULP), then use ULP error to interpret results. You’ll map Libamath function suffixes to selectable accuracy modes and their error bounds. Finally, you’ll run the Neon single-precision exponential function in each mode, calculate its ULP error, and compare it with the example demonstrated in the Learning Path.

### Frequently asked questions
<details>
<summary>How do I recognize which Libamath accuracy mode a function uses?</summary>
Check the function symbol suffix. The `*_u10` suffix selects high accuracy with a 1 ULP bound, no suffix selects default accuracy, and `*_umax` selects maximum performance.
</details>

<details>
<summary>What ULP error bounds should I expect for each mode?</summary>
Compare your measured error with these limits: high accuracy is at most 1 ULP, default accuracy is at most 3.5 ULP, and low accuracy is approximately at most 4,096 ULP.
</details>

<details>
<summary>What result should I expect when running the example?</summary>
Confirm that the program calls the Neon single-precision exponential function in each mode and reports an error calculated by `ulp_error.h`. Each value should remain within its documented ULP bound.
</details>

<details>
<summary>What should I check if the example can’t find amath.h or float32x4_t?</summary>
Confirm that Arm Performance Libraries 25.04 or later is installed and that your build uses the correct include paths. Compile on an Arm system so that the example’s vector types and calling convention are available.
</details>

<details>
<summary>How is ULP computed, and why use it instead of absolute error?</summary>
Calculate `ULP(x)` as `nextafter(x, +inf) - x`, which gives the spacing to the next representable value. ULP error scales with magnitude, so you avoid the bias that absolute error can introduce across different ranges.
</details>
