forked from zufuliu/notepad4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
C.c
1929 lines (1770 loc) · 54.9 KB
/
C.c
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// C99 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
// C11 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf
// C2x http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2479.pdf
// https://en.cppreference.com/w/c
// https://en.cppreference.com/w/c/header
// https://en.cppreference.com/w/c/links
_Alignas alignas
_Alignof alignof
_Atomic
_Generic
_Noreturn noreturn
_Static_assert static_assert
_Thread_local thread_local
break
case const continue
default do
else enum extern
for
goto
if
inline
register restrict return
sizeof static struct switch
typedef
union
void volatile
while
_Bool bool _Complex complex _Imaginary imaginary
_Decimal128 _Decimal32 _Decimal64 // C2x
auto char double float int long short signed unsigned
asm
fortran
// Predefined identifiers
__func__
// Preprocessing directives
#if
#elif
#else
#endif
defined
#ifdef
#endif
#ifndef
#endif
#define
#undef
#include
#line
#error
#pragma
_Pragma()
// Argument substitution
__VA_ARGS__
// Predefined macro names
__DATE__
__FILE__
__LINE__
__STDC__
__STDC_HOSTED__
__STDC_VERSION__
__TIME__
// Environment macros
__STDC_ISO_10646__
__STDC_MB_MIGHT_NEQ_WC__
__STDC_UTF_16__
__STDC_UTF_32__
// Conditional feature macros
__STDC_ANALYZABLE__
__STDC_IEC_60559_BFP__
__STDC_IEC_559__
__STDC_IEC_60559_DFP__
__STDC_IEC_60559_COMPLEX__
__STDC_IEC_559_COMPLEX__
__STDC_LIB_EXT1__
__STDC_NO_ATOMICS__
__STDC_NO_COMPLEX__
__STDC_NO_THREADS__
__STDC_NO_VLA__
// Visual C++ Predefined Macros
// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
// GCC Predefined Macros
// https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html
// echo | clang -dM -E -
// echo | gcc -dM -E -
// https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-additional-predefined-macros
// https://sourceforge.net/p/predef/wiki/Compilers/
#include <assert.h>
{ // Diagnostics
NDEBUG
void assert(scalar expression);
static_assert() // C11
_Static_assert() // C11
}
#include <complex.h>
{ // Complex arithmetic
complex
_Complex
_Complex_I
imaginary
_Imaginary_I
_Imaginary
#pragma STDC CX_LIMITED_RANGE on-off-switch
// Trigonometric functions
double complex cacos(double complex z);
float complex cacosf(float complex z);
long double complex cacosl(long double complex z);
double complex casin(double complex z);
float complex casinf(float complex z);
long double complex casinl(long double complex z);
double complex catan(double complex z);
float complex catanf(float complex z);
long double complex catanl(long double complex z);
double complex ccos(double complex z);
float complex ccosf(float complex z);
long double complex ccosl(long double complex z);
double complex csin(double complex z);
float complex csinf(float complex z);
long double complex csinl(long double complex z);
double complex ctan(double complex z);
float complex ctanf(float complex z);
long double complex ctanl(long double complex z);
// Hyperbolic functions
double complex cacosh(double complex z);
float complex cacoshf(float complex z);
long double complex cacoshl(long double complex z);
double complex casinh(double complex z);
float complex casinhf(float complex z);
long double complex casinhl(long double complex z);
double complex catanh(double complex z);
float complex catanhf(float complex z);
long double complex catanhl(long double complex z);
double complex ccosh(double complex z);
float complex ccoshf(float complex z);
long double complex ccoshl(long double complex z);
double complex csinh(double complex z);
float complex csinhf(float complex z);
long double complex csinhl(long double complex z);
double complex ctanh(double complex z);
float complex ctanhf(float complex z);
long double complex ctanhl(long double complex z);
// Exponential and logarithmic functions
double complex cexp(double complex z);
float complex cexpf(float complex z);
long double complex cexpl(long double complex z);
double complex clog(double complex z);
float complex clogf(float complex z);
long double complex clogl(long double complex z);
// Power and absolute-value functions
double cabs(double complex z);
float cabsf(float complex z);
long double cabsl(long double complex z);
double complex cpow(double complex x, double complex y);
float complex cpowf(float complex x, float complex y);
long double complex cpowl(long double complex x, long double complex y);
double complex csqrt(double complex z);
float complex csqrtf(float complex z);
long double complex csqrtl(long double complex z);
// Manipulation functions
double carg(double complex z);
float cargf(float complex z);
long double cargl(long double complex z);
double cimag(double complex z);
float cimagf(float complex z);
long double cimagl(long double complex z);
double complex CMPLX(double x, double y);
float complex CMPLXF(float x, float y);
long double complex CMPLXL(long double x, long double y);
double complex conj(double complex z);
float complex conjf(float complex z);
long double complex conjl(long double complex z);
double complex cproj(double complex z);
float complex cprojf(float complex z);
long double complex cprojl(long double complex z);
double creal(double complex z);
float crealf(float complex z);
long double creall(long double complex z);
}
#include <ctype.h>
{ // Character handling
// Character classification functions
int isalnum(int c);
int isalpha(int c);
int isblank(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
// Character case mapping functions
int tolower(int c);
int toupper(int c);
}
#include <errno.h>
{ // Errors
EDOM
EILSEQ
ERANGE
errno
}
#include <fenv.h>
{ // Floating-point environment
fenv_t
femode_t // C2x
fexcept_t
FE_DIVBYZERO
FE_INEXACT
FE_INVALID
FE_OVERFLOW
FE_UNDERFLOW
FE_DFL_MODE // C2x
FE_ALL_EXCEPT
FE_DOWNWARD
FE_TONEAREST
FE_TOWARDZERO
FE_UPWARD
FE_DEC_DOWNWARD // C2x
FE_DEC_TONEAREST // C2x
FE_DEC_TONEARESTFROMZERO // C2x
FE_DEC_TOWARDZERO // C2x
FE_DEC_UPWARD // C2x
FE_DFL_ENV
#pragma STDC FENV_ACCESS on-off-switch
#pragma STDC FENV_ROUND direction
#pragma STDC FENV_ROUND FE_DYNAMIC
#pragma STDC FENV_DEC_ROUND direction
// Floating-point exceptions
int feclearexcept(int excepts);
int fegetexceptflag(fexcept_t *flagp, int excepts);
int feraiseexcept(int excepts);
int fesetexcept(int excepts); // C2x
int fesetexceptflag(const fexcept_t *flagp, int excepts);
int fetestexceptflag(const fexcept_t *flagp, int excepts); // C2x
int fetestexcept(int excepts);
// Rounding
int fegetmode(femode_t *modep); // C2x
int fegetround(void);
int fe_dec_getround(void); // C2x
int fesetmode(const femode_t *modep); // C2x
int fesetround(int round);
int fe_dec_setround(int round); // C2x
// Environment
int fegetenv(fenv_t *envp);
int feholdexcept(fenv_t *envp);
int fesetenv(const fenv_t *envp);
int feupdateenv(const fenv_t *envp);
}
#include <float.h>
{ // Characteristics of floating types
FLT_ROUNDS
FLT_EVAL_METHOD
FLT_HAS_SUBNORM
DBL_HAS_SUBNORM
LDBL_HAS_SUBNORM
FLT_RADIX
FLT_MANT_DIG
DBL_MANT_DIG
LDBL_MANT_DIG
FLT_DECIMAL_DIG
DBL_DECIMAL_DIG
LDBL_DECIMAL_DIG
DECIMAL_DIG
FLT_DIG
DBL_DIG
LDBL_DIG
FLT_MIN_EXP
DBL_MIN_EXP
LDBL_MIN_EXP
FLT_MIN_10_EXP
DBL_MIN_10_EXP
LDBL_MIN_10_EXP
FLT_MAX_EXP
DBL_MAX_EXP
LDBL_MAX_EXP
FLT_MAX_10_EXP
DBL_MAX_10_EXP
LDBL_MAX_10_EXP
FLT_MAX
DBL_MAX
LDBL_MAX
FLT_EPSILON
DBL_EPSILON
LDBL_EPSILON
FLT_MIN
DBL_MIN
LDBL_MIN
FLT_TRUE_MIN
DBL_TRUE_MIN
LDBL_TRUE_MIN
}
#include <inttypes.h>
{ // Format conversion of integer types
imaxdiv_t
// Macros for format specifiers
// The fprintf macros for signed integers
PRId8
PRId16
PRId32
PRId64
PRIdLEAST8
PRIdLEAST16
PRIdLEAST32
PRIdLEAST64
PRIdFAST8
PRIdFAST16
PRIdFAST32
PRIdFAST64
PRIdMAX
PRIdPTR
PRIi8
PRIi16
PRIi32
PRIi64
PRIiLEAST8
PRIiLEAST16
PRIiLEAST32
PRIiLEAST64
PRIiFAST8
PRIiFAST16
PRIiFAST32
PRIiFAST64
PRIiMAX
PRIiPTR
// The fprintf macros for unsigned integers
PRIo8
PRIo16
PRIo32
PRIo64
PRIoLEAST8
PRIoLEAST16
PRIoLEAST32
PRIoLEAST64
PRIoFAST8
PRIoFAST16
PRIoFAST32
PRIoFAST64
PRIoMAX
PRIoPTR
PRIu8
PRIu16
PRIu32
PRIu64
PRIuLEAST8
PRIuLEAST16
PRIuLEAST32
PRIuLEAST64
PRIuFAST8
PRIuFAST16
PRIuFAST32
PRIuFAST64
PRIuMAX
PRIuPTR
PRIx8
PRIx16
PRIx32
PRIx64
PRIxLEAST8
PRIxLEAST16
PRIxLEAST32
PRIxLEAST64
PRIxFAST8
PRIxFAST16
PRIxFAST32
PRIxFAST64
PRIxMAX
PRIxPTR
PRIX8
PRIX16
PRIX32
PRIX64
PRIXLEAST8
PRIXLEAST16
PRIXLEAST32
PRIXLEAST64
PRIXFAST8
PRIXFAST16
PRIXFAST32
PRIXFAST64
PRIXMAX
PRIXPTR
// The fscanf macros for signed integers
SCNd8
SCNd16
SCNd32
SCNd64
SCNdLEAST8
SCNdLEAST16
SCNdLEAST32
SCNdLEAST64
SCNdFAST8
SCNdFAST16
SCNdFAST32
SCNdFAST64
SCNdMAX
SCNdPTR
SCNi8
SCNi16
SCNi32
SCNi64
SCNiLEAST8
SCNiLEAST16
SCNiLEAST32
SCNiLEAST64
SCNiFAST8
SCNiFAST16
SCNiFAST32
SCNiFAST64
SCNiMAX
SCNiPTR
// The fscanf macros for unsigned integers
SCNo8
SCNo16
SCNo32
SCNo64
SCNoLEAST8
SCNoLEAST16
SCNoLEAST32
SCNoLEAST64
SCNoFAST8
SCNoFAST16
SCNoFAST32
SCNoFAST64
SCNoMAX
SCNoPTR
SCNu8
SCNu16
SCNu32
SCNu64
SCNuLEAST8
SCNuLEAST16
SCNuLEAST32
SCNuLEAST64
SCNuFAST8
SCNuFAST16
SCNuFAST32
SCNuFAST64
SCNuMAX
SCNuPTR
SCNx8
SCNx16
SCNx32
SCNx64
SCNxLEAST8
SCNxLEAST16
SCNxLEAST32
SCNxLEAST64
SCNxFAST8
SCNxFAST16
SCNxFAST32
SCNxFAST64
SCNxMAX
SCNxPTR
// Functions for greatest-width integer types
intmax_t imaxabs(intmax_t j);
imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
intmax_t strtoimax(const char * restrict nptr, char ** restrict endptr, int base);
uintmax_t strtoumax(const char * restrict nptr, char ** restrict endptr, int base);
intmax_t wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base);
uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base);
}
#include <iso646.h>
{ // Alternative spellings
and &&
and_eq &=
bitand &
bitor |
compl ~
not !
not_eq !=
or ||
or_eq |=
xor ^
xor_eq ^=
}
#include <limits.h>
{ // Sizes of integer types
CHAR_BIT
SCHAR_MIN
SCHAR_MAX
UCHAR_MAX
CHAR_MIN
CHAR_MAX
MB_LEN_MAX
SHRT_MIN
SHRT_MAX
USHRT_MAX
INT_MIN
INT_MAX
UINT_MAX
LONG_MIN
LONG_MAX
ULONG_MAX
LLONG_MIN
LLONG_MAX
ULLONG_MAX
}
#include <locale.h>
{ // Localization
struct lconv;
NULL
LC_ALL
LC_COLLATE
LC_CTYPE
LC_MONETARY
LC_NUMERIC
LC_TIME
char *setlocale(int category, const char *locale);
struct lconv *localeconv(void);
}
#include <math.h>
{ // Mathematics
__STDC_VERSION_MATH_H__
float_t
double_t
_Decimal32_t // C2x
_Decimal64_t // C2x
HUGE_VAL
HUGE_VALF
HUGE_VALL
HUGE_VAL_D32 // C2x
HUGE_VAL_D64 // C2x
HUGE_VAL_D128 // C2x
INFINITY
DEC_INFINITY // C2x
NAN
DEC_NAN // C2x
SNANF // C2x
SNAN // C2x
SNANL // C2x
SNAND32 // C2x
SNAND64 // C2x
SNAND128 // C2x
FP_INFINITE
FP_NAN
FP_NORMAL
FP_SUBNORMAL
FP_ZERO
FP_INT_UPWARD // C2x
FP_INT_DOWNWARD // C2x
FP_INT_TOWARDZERO // C2x
FP_INT_TONEARESTFROMZERO // C2x
FP_INT_TONEAREST // C2x
FP_FAST_FMA
FP_FAST_FMAF
FP_FAST_FMAL
FP_FAST_FMAD32 // C2x
FP_FAST_FMAD64 // C2x
FP_FAST_FMAD128 // C2x
// C2x
FP_FAST_FADD
FP_FAST_FADDL
FP_FAST_DADDL
FP_FAST_FSUB
FP_FAST_FSUBL
FP_FAST_DSUBL
FP_FAST_FMUL
FP_FAST_FMULL
FP_FAST_DMULL
FP_FAST_FDIV
FP_FAST_FDIVL
FP_FAST_DDIVL
FP_FAST_FSQRT
FP_FAST_FSQRTL
FP_FAST_DSQRTL
FP_FAST_FFMA
FP_FAST_FFMAL
FP_FAST_DFMAL
// C2x
FP_FAST_D32ADDD64
FP_FAST_D32ADDD128
FP_FAST_D64ADDD128
FP_FAST_D32SUBD64
FP_FAST_D32SUBD128
FP_FAST_D64SUBD128
FP_FAST_D32MULD64
FP_FAST_D32MULD128
FP_FAST_D64MULD128
FP_FAST_D32DIVD64
FP_FAST_D32DIVD128
FP_FAST_D64DIVD128
FP_FAST_D32FMAD64
FP_FAST_D32FMAD128
FP_FAST_D64FMAD128
FP_FAST_D32SQRTD64
FP_FAST_D32SQRTD128
FP_FAST_D64SQRTD128
FP_ILOGB0
FP_ILOGBNAN
FP_LLOGB0 // C2x
FP_LLOGBNAN // C2x
MATH_ERRNO
MATH_ERREXCEPT
math_errhandling
#pragma STDC FP_CONTRACT on-off-switch
// Classification macros
int fpclassify(real-floating x);
int iscanonical(real-floating x); // C2x
int isfinite(real-floating x);
int isinf(real-floating x);
int isnan(real-floating x);
int isnormal(real-floating x);
int signbit(real-floating x);
int issignaling(real-floating x); // C2x
int issubnormal(real-floating x); // C2x
int iszero(real-floating x); // C2x
// Trigonometric functions
double acos(double x);
float acosf(float x);
long double acosl(long double x);
_Decimal32 acosd32(_Decimal32 x);
_Decimal64 acosd64(_Decimal64 x);
_Decimal128 acosd128(_Decimal128 x);
double asin(double x);
float asinf(float x);
long double asinl(long double x);
_Decimal32 asind32(_Decimal32 x);
_Decimal64 asind64(_Decimal64 x);
_Decimal128 asind128(_Decimal128 x);
double atan(double x);
float atanf(float x);
long double atanl(long double x);
_Decimal32 atand32(_Decimal32 x);
_Decimal64 atand64(_Decimal64 x);
_Decimal128 atand128(_Decimal128 x);
double atan2(double y, double x);
float atan2f(float y, float x);
long double atan2l(long double y, long double x);
_Decimal32 atan2d32(_Decimal32 y, _Decimal32 x);
_Decimal64 atan2d64(_Decimal64 y, _Decimal64 x);
_Decimal128 atan2d128(_Decimal128 y, _Decimal128 x);
double cos(double x);
float cosf(float x);
long double cosl(long double x);
_Decimal32 cosd32(_Decimal32 x);
_Decimal64 cosd64(_Decimal64 x);
_Decimal128 cosd128(_Decimal128 x);
double sin(double x);
float sinf(float x);
long double sinl(long double x);
_Decimal32 sind32(_Decimal32 x);
_Decimal64 sind64(_Decimal64 x);
_Decimal128 sind128(_Decimal128 x);
double tan(double x);
float tanf(float x);
long double tanl(long double x);
_Decimal32 tand32(_Decimal32 x);
_Decimal64 tand64(_Decimal64 x);
_Decimal128 tand128(_Decimal128 x);
double acospi(double x); // C2x
float acospif(float x);
long double acospil(long double x);
_Decimal32 acospid32(_Decimal32 x);
_Decimal64 acospid64(_Decimal64 x);
_Decimal128 acospid128(_Decimal128 x);
double asinpi(double x); // C2x
float asinpif(float x);
long double asinpil(long double x);
_Decimal32 asinpid32(_Decimal32 x);
_Decimal64 asinpid64(_Decimal64 x);
_Decimal128 asinpid128(_Decimal128 x);
double atanpi(double x); // C2x
float atanpif(float x);
long double atanpil(long double x);
_Decimal32 atanpid32(_Decimal32 x);
_Decimal64 atanpid64(_Decimal64 x);
_Decimal128 atanpid128(_Decimal128 x);
double atan2pi(double y, double x); // C2x
float atan2pif(float y, float x);
long double atan2pil(long double y, long double x);
_Decimal32 atan2pid32(_Decimal32 y, _Decimal32 x);
_Decimal64 atan2pid64(_Decimal64 y, _Decimal64 x);
_Decimal128 atan2pid128(_Decimal128 y, _Decimal128 x);
double cospi(double x); // C2x
float cospif(float x);
long double cospil(long double x);
_Decimal32 cospid32(_Decimal32 x);
_Decimal64 cospid64(_Decimal64 x);
_Decimal128 cospid128(_Decimal128 x);
double sinpi(double x); // C2x
float sinpif(float x);
long double sinpil(long double x);
_Decimal32 sinpid32(_Decimal32 x);
_Decimal64 sinpid64(_Decimal64 x);
_Decimal128 sinpid128(_Decimal128 x);
double tanpi(double x); // C2x
float tanpif(float x);
long double tanpil(long double x);
_Decimal32 tanpid32(_Decimal32 x);
_Decimal64 tanpid64(_Decimal64 x);
_Decimal128 tanpid128(_Decimal128 x);
// Hyperbolic functions
double acosh(double x);
float acoshf(float x);
long double acoshl(long double x);
_Decimal32 acoshd32(_Decimal32 x);
_Decimal64 acoshd64(_Decimal64 x);
_Decimal128 acoshd128(_Decimal128 x);
double asinh(double x);
float asinhf(float x);
long double asinhl(long double x);
_Decimal32 asinhd32(_Decimal32 x);
_Decimal64 asinhd64(_Decimal64 x);
_Decimal128 asinhd128(_Decimal128 x);
double atanh(double x);
float atanhf(float x);
long double atanhl(long double x);
_Decimal32 tanhd32(_Decimal32 x);
_Decimal64 tanhd64(_Decimal64 x);
_Decimal128 tanhd128(_Decimal128 x);
double cosh(double x);
float coshf(float x);
long double coshl(long double x);
_Decimal32 coshd32(_Decimal32 x);
_Decimal64 coshd64(_Decimal64 x);
_Decimal128 coshd128(_Decimal128 x);
double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);
_Decimal32 sinhd32(_Decimal32 x);
_Decimal64 sinhd64(_Decimal64 x);
_Decimal128 sinhd128(_Decimal128 x);
double tanh(double x);
float tanhf(float x);
long double tanhl(long double x);
_Decimal32 tanhd32(_Decimal32 x);
_Decimal64 tanhd64(_Decimal64 x);
_Decimal128 tanhd128(_Decimal128 x);
// Exponential and logarithmic functions
double exp(double x);
float expf(float x);
long double expl(long double x);
_Decimal32 expd32(_Decimal32 x);
_Decimal64 expd64(_Decimal64 x);
_Decimal128 expd128(_Decimal128 x);
double exp10(double x); // C2x
float exp10f(float x);
long double exp10l(long double x);
_Decimal32 exp10d32(_Decimal32 x);
_Decimal64 exp10d64(_Decimal64 x);
_Decimal128 exp10d128(_Decimal128 x);
double exp10m1(double x); // C2x
float exp10m1f(float x);
long double exp10m1l(long double x);
_Decimal32 exp10m1d32(_Decimal32 x);
_Decimal64 exp10m1d64(_Decimal64 x);
_Decimal128 exp10m1d128(_Decimal128 x);
double exp2(double x);
float exp2f(float x);
long double exp2l(long double x);
_Decimal32 exp2d32(_Decimal32 x);
_Decimal64 exp2d64(_Decimal64 x);
_Decimal128 exp2d128(_Decimal128 x);
double exp2m1(double x); // C2x
float exp2m1f(float x);
long double exp2m1l(long double x);
_Decimal32 exp2m1d32(_Decimal32 x);
_Decimal64 exp2m1d64(_Decimal64 x);
_Decimal128 exp2m1d128(_Decimal128 x);
double expm1(double x);
float expm1f(float x);
long double expm1l(long double x);
_Decimal32 expm1d32(_Decimal32 x);
_Decimal64 expm1d64(_Decimal64 x);
_Decimal128 expm1d128(_Decimal128 x);
double frexp(double value, int *exp);
float frexpf(float value, int *exp);
long double frexpl(long double value, int *exp);
_Decimal32 frexpd32(_Decimal32 value, int *p);
_Decimal64 frexpd64(_Decimal64 value, int *p);
_Decimal128 frexpd128(_Decimal128 value, int *p);
int ilogb(double x);
int ilogbf(float x);
int ilogbl(long double x);
int ilogbd32(_Decimal32 x);
int ilogbd64(_Decimal64 x);
int ilogbd128(_Decimal128 x);
double ldexp(double x, int exp);
float ldexpf(float x, int exp);
long double ldexpl(long double x, int exp);
_Decimal32 ldexpd32(_Decimal32 x, int p);
_Decimal64 ldexpd64(_Decimal64 x, int p);
_Decimal128 ldexpd128(_Decimal128 x, int p);
int llogb(double x); // C2x
int llogbf(float x);
int llogbl(long double x);
int llogbd32(_Decimal32 x);
int llogbd64(_Decimal64 x);
int llogbd128(_Decimal128 x);
double log(double x);
float logf(float x);
long double logl(long double x);
_Decimal32 logd32(_Decimal32 x);
_Decimal64 logd64(_Decimal64 x);
_Decimal128 logd128(_Decimal128 x);
double log10(double x);
float log10f(float x);
long double log10l(long double x);
_Decimal32 log10d32(_Decimal32 x);
_Decimal64 log10d64(_Decimal64 x);
_Decimal128 log10d128(_Decimal128 x);
double log10p1(double x); // C2x
float log10p1f(float x);
long double log10p1l(long double x);
_Decimal32 log10p1d32(_Decimal32 x);
_Decimal64 log10p1d64(_Decimal64 x);
_Decimal128 log10p1d128(_Decimal128 x);
double log1p(double x);
float log1pf(float x);
long double log1pl(long double x);
double logp1(double x); // C2x
float logp1f(float x);
long double logp1l(long double x);
_Decimal32 log1pd32(_Decimal32 x);
_Decimal64 log1pd64(_Decimal64 x);
_Decimal128 log1pd128(_Decimal128 x);
_Decimal32 logp1d32(_Decimal32 x);
_Decimal64 logp1d64(_Decimal64 x);
_Decimal128 logp1d128(_Decimal128 x);
double log2(double x);
float log2f(float x);
long double log2l(long double x);
_Decimal32 log2d32(_Decimal32 x);
_Decimal64 log2d64(_Decimal64 x);
_Decimal128 log2d128(_Decimal128 x);
double log2p1(double x); // C2x
float log2p1f(float x);
long double log2p1l(long double x);
_Decimal32 log2p1d32(_Decimal32 x);
_Decimal64 log2p1d64(_Decimal64 x);
_Decimal128 log2p1d128(_Decimal128 x);
double logb(double x);
float logbf(float x);
long double logbl(long double x);
_Decimal32 logbd32(_Decimal32 x);
_Decimal64 logbd64(_Decimal64 x);
_Decimal128 logbd128(_Decimal128 x);
double modf(double value, double *iptr);
float modff(float value, float *iptr);
long double modfl(long double value, long double *iptr);
_Decimal32 modfd32(_Decimal32 x, _Decimal32 *iptr);
_Decimal64 modfd64(_Decimal64 x, _Decimal64 *iptr);
_Decimal128 modfd128(_Decimal128 x, _Decimal128 *iptr);
double scalbn(double x, int n);
float scalbnf(float x, int n);
long double scalbnl(long double x, int n);
_Decimal32 scalbnd32(_Decimal32 x, int n);
_Decimal64 scalbnd64(_Decimal64 x, int n);
_Decimal128 scalbnd128(_Decimal128 x, int n);
double scalbln(double x, long int n);
float scalblnf(float x, long int n);
long double scalblnl(long double x, long int n);
_Decimal32 scalblnd32(_Decimal32 x, long int n);
_Decimal64 scalblnd64(_Decimal64 x, long int n);
_Decimal128 scalblnd128(_Decimal128 x, long int n);
// Power and absolute-value functions
double cbrt(double x);
float cbrtf(float x);
long double cbrtl(long double x);
_Decimal32 cbrtd32(_Decimal32 x);
_Decimal64 cbrtd64(_Decimal64 x);
_Decimal128 cbrtd128(_Decimal128 x);
double compoundn(double x, intmax_t n); // C2x
float compoundnf(float x, intmax_t n);
long double compoundnl(long double x, intmax_t n);
_Decimal32 compoundnd32(_Decimal32 x, intmax_t n);
_Decimal64 compoundnd64(_Decimal64 x, intmax_t n);
_Decimal128 compoundnd128(_Decimal128 x, intmax_t n);
double fabs(double x);
float fabsf(float x);
long double fabsl(long double x);
_Decimal32 fabsd32(_Decimal32 x);
_Decimal64 fabsd64(_Decimal64 x);
_Decimal128 fabsd128(_Decimal128 x);
double hypot(double x, double y);
float hypotf(float x, float y);
long double hypotl(long double x, long double y);
_Decimal32 hypotd32(_Decimal32 x, _Decimal32 y);
_Decimal64 hypotd64(_Decimal64 x, _Decimal64 y);
_Decimal128 hypotd128(_Decimal128 x, _Decimal128 y);
double pow(double x, double y);
float powf(float x, float y);
long double powl(long double x, long double y);
_Decimal32 powd32(_Decimal32 x, _Decimal32 y);
_Decimal64 powd64(_Decimal64 x, _Decimal64 y);
_Decimal128 powd128(_Decimal128 x, _Decimal128 y);
double pown(double x, intmax_t n); // C2x
float pownf(float x, intmax_t n);
long double pownl(long double x, intmax_t n);
_Decimal32 pownd32(_Decimal32 x, intmax_t n);
_Decimal64 pownd64(_Decimal64 x, intmax_t n);
_Decimal128 pownd128(_Decimal128 x, intmax_t n);
double powr(double y, double x); // C2x
float powrf(float y, float x);
long double powrl(long double y, long double x);
_Decimal32 powrd32(_Decimal32 y, _Decimal32 x);
_Decimal64 powrd64(_Decimal64 y, _Decimal64 x);
_Decimal128 powrd128(_Decimal128 y, _Decimal128 x);
double rootn(double x, intmax_t n); // C2x
float rootnf(float x, intmax_t n);
long double rootnl(long double x, intmax_t n);
_Decimal32 rootnd32(_Decimal32 x, intmax_t n);
_Decimal64 rootnd64(_Decimal64 x, intmax_t n);
_Decimal128 rootnd128(_Decimal128 x, intmax_t n);
double rsqrt(double x); // C2x
float rsqrtf(float x);
long double rsqrtl(long double x);
_Decimal32 rsqrtd32(_Decimal32 x);
_Decimal64 rsqrtd64(_Decimal64 x);
_Decimal128 rsqrtd128(_Decimal128 x);
double sqrt(double x);
float sqrtf(float x);
long double sqrtl(long double x);
_Decimal32 sqrtd32(_Decimal32 x);
_Decimal64 sqrtd64(_Decimal64 x);
_Decimal128 sqrtd128(_Decimal128 x);
// Error and gamma functions
double erf(double x);
float erff(float x);
long double erfl(long double x);
_Decimal32 erfd32(_Decimal32 x);
_Decimal64 erfd64(_Decimal64 x);
_Decimal128 erfd128(_Decimal128 x);
double erfc(double x);
float erfcf(float x);
long double erfcl(long double x);
_Decimal32 erfcd32(_Decimal32 x);