blob: 6820e03dab71589a6c35d8a82420dd79dcf4e505 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*
* Copyright (c) 2022, Peter Elliott <pelliott@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <complex.h>
extern "C" {
// Function definitions of this form "type (name)(args)" are intentional, to
// prevent macro versions of "name" from being incorrectly expanded. These
// functions are here to provide external linkage to their macro implementations.
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/creal.html
float(crealf)(float complex z)
{
return crealf(z);
}
double(creal)(double complex z)
{
return creal(z);
}
long double(creall)(long double complex z)
{
return creall(z);
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/cimag.html
double(cimag)(double complex z)
{
return cimag(z);
}
float(cimagf)(float complex z)
{
return cimagf(z);
}
long double(cimagl)(long double complex z)
{
return cimagl(z);
}
}
|