🍑 nectarine
Audio synthesis tools for C23
Loading...
Searching...
No Matches
denormals.h File Reference

Functions to toggle IEEE 754 denormals on the current thread. More...

#include <stdint.h>

Go to the source code of this file.

Functions

static void nec_disable_denormals (void)
 Disable IEEE 754 denormals on the current thread.
static void nec_enable_denormals (void)
 Enable IEEE 754 denormals on the current thread.

Detailed Description

Functions to toggle IEEE 754 denormals on the current thread.

Function Documentation

◆ nec_disable_denormals()

void nec_disable_denormals ( void )
inlinestatic

Disable IEEE 754 denormals on the current thread.

This is desirable for audio calculations as processing denormal values is significantly slower than normal values, and in the context of audio signal processing, denormal values are typically near silence and contain no useful information anyways.

Note
This only affects scalar calculations, as both x86 and ARM's SIMD operations always treat denormal values as zero.

◆ nec_enable_denormals()

void nec_enable_denormals ( void )
inlinestatic

Enable IEEE 754 denormals on the current thread.

Note
This only affects scalar calculations, as both x86 and ARM's SIMD operations always treat denormal values as zero.
See also
nec_disable_denormals()