# Optimize exponential functions with FEXPA

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/fexpa/)
- [Learn exponential function optimization techniques](https://learn.arm.com/learning-paths/servers-and-cloud-computing/fexpa/theory/)
- [Implement exponential with SVE intrinsics](https://learn.arm.com/learning-paths/servers-and-cloud-computing/fexpa/implementation/)
- [Optimize with FEXPA instruction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/fexpa/fexpa/)
- [Review benefits and next steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/fexpa/conclusion/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/fexpa/_next-steps/)

## About this Learning Path

| Skill level:     | Introductory          |
|------------------|----------------------|
| Reading time:    | 15 min               |
| Last updated:    | 14 Sep 2026          |

### Authors:
- Arnaud Grasset
- Claudio Martino
- Alexandre Romana

### 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)
- [AWS Graviton](https://learn.arm.com/tag/aws-graviton)
- [Microsoft Azure Cobalt](https://learn.arm.com/tag/microsoft-azure-cobalt)
- [Google Axion](https://learn.arm.com/tag/google-axion)
- [Linux](https://learn.arm.com/tag/linux)
- [macOS](https://learn.arm.com/tag/macos)
- [C](https://learn.arm.com/tag/c)
- [CPP](https://learn.arm.com/tag/cpp)

### Who is this for?
This is an introductory topic for developers interested in accelerating exponential function computations using Arm's Scalable Vector Extension (SVE). The Floating Point Exponential Accelerator (FEXPA) instruction provides hardware acceleration for exponential calculations on Arm Neoverse processors.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Implement the exponential function using SVE intrinsics
- Optimize the function with FEXPA

### Prerequisites
Before starting, you will need the following:
- Access to an [AWS Graviton4, Google Axion, or Azure Cobalt 100 virtual machine from a cloud service provider](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/)
- Some familiarity with SIMD programming and SVE intrinsics

### Summary
You’ll implement an exponential function with Arm SVE intrinsics, starting with range reduction and polynomial approximation. First, you’ll select an approximation interval, choose a polynomial degree, and validate your result against a reference. Then, you’ll use the SVE FEXPA instruction for hardware-assisted reconstruction, reducing the polynomial work while preserving accuracy for your performance-sensitive Neoverse code.

### Frequently asked questions
**How do I compile the SVE example?**
Install `gcc`, then compile `exp_sve.c` with `gcc -O3 -march=armv8-a+sve exp_sve.c -o exp_sve -lm`. Use an SVE-capable Arm processor to execute the SVE implementation.

**Which floating-point precision am I building with in this example?**
The provided implementation uses single precision: its coefficients are `float` values and its SVE vectors use `svfloat32_t`. The example therefore builds the FP32 version described in the precision table.

**When should I switch my code from the polynomial-only version to the FEXPA-optimized version?**
After the baseline SVE polynomial version compiles and produces correct results, replace the range-reduction sequence with the FEXPA-based approach. Re-validate accuracy against your target error before continuing.

**What result should I expect after I enable FEXPA?**
FEXPA performs table lookup and bit manipulation in hardware, which lets you use a lower-degree polynomial for the same target precision. Confirm this by checking approximation error over a representative input range.

**How do I choose my polynomial degree and input range?**
Use range reduction to map inputs into an interval where the polynomial is accurate, then tune the polynomial degree to meet your error goal. Evaluate absolute or relative error across representative inputs before finalizing the choice.
