liba 0.1.15

An algorithm library based on C/C++
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
/*!
 @file complex.h
 @brief complex number
*/

#ifndef LIBA_COMPLEX_H
#define LIBA_COMPLEX_H

#include "a.h"

/*!
 @ingroup liba
 @addtogroup a_complex complex number
 @{
*/

// clang-format off
/*! format constants for the fprintf family of functions */
#define A_COMPLEX_PRI(RF, RC, IF, IC) "(" A_FLOAT_PRI(RF, RC) "," A_FLOAT_PRI(IF, IC) ")"
/*! constructs a complex number constant from real and imaginary parts */
#if !defined __cplusplus
#define A_COMPLEX_C(R, I) (a_complex){A_FLOAT_C(R), A_FLOAT_C(I)}
#else /* !__cplusplus */
#define A_COMPLEX_C(R, I) {A_FLOAT_C(R), A_FLOAT_C(I)}
#endif /* __cplusplus */
/*! constructs a complex number from real and imaginary parts */
#if !defined __cplusplus
#define a_complex_c(r, i) (a_complex){a_float_c(r), a_float_c(i)}
#else /* !__cplusplus */
#define a_complex_c(r, i) {a_float_c(r), a_float_c(i)}
#endif /* __cplusplus */
// clang-format on

/*!
 @brief instance structure for complex number
*/
typedef struct a_complex
{
    a_float real; //!< real part of complex number
    a_float imag; //!< imaginary part of complex number
} a_complex;

#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */
#if defined(LIBA_COMPLEX_C)
#undef A_INTERN
#define A_INTERN A_INLINE
#endif /* LIBA_COMPLEX_C */

/*!
 @brief constructs a complex number from real and imaginary parts
 @param ctx = \f$ (\rm{Re},\rm{Im}) \f$
 @param real real part of complex number
 @param imag imaginary part of complex number
*/
static A_INLINE void a_complex_rect(a_complex *ctx, a_float real, a_float imag)
{
    ctx->real = real;
    ctx->imag = imag;
}

/*!
 @brief constructs a complex number from polar form
 @param ctx = \f$ (\rho\cos\theta,\rho\sin\theta{i}) \f$
 @param rho a distance from a reference point
 @param theta an angle from a reference direction
*/
A_EXTERN void a_complex_polar(a_complex *ctx, a_float rho, a_float theta);

/*!
 @brief parse a string into a complex number
 @param ctx points to an instance structure for complex number
 @param str complex number string to be parsed
 @return number of parsed characters
*/
A_EXTERN unsigned int a_complex_parse(a_complex *ctx, char const *str);

/*!
 @brief complex number x is equal to complex number y
 @param x complex number on the left
 @param y complex number on the right
 @return result of comparison
*/
A_EXTERN a_bool a_complex_eq(a_complex x, a_complex y);

/*!
 @brief complex number x is not equal to complex number y
 @param x complex number on the left
 @param y complex number on the right
 @return result of comparison
*/
A_EXTERN a_bool a_complex_ne(a_complex x, a_complex y);

/* Properties of complex numbers */

/*!
 @brief computes the natural logarithm of magnitude of a complex number
 @param z a complex number
 @return = \f$ \log\left|x\right| \f$
*/
A_EXTERN a_float a_complex_logabs(a_complex z);

/*!
 @brief computes the squared magnitude of a complex number
 @param z a complex number
 @return = \f$ a^2+b^2 \f$
*/
A_EXTERN a_float a_complex_abs2(a_complex z);

/*!
 @brief computes the magnitude of a complex number
 @param z a complex number
 @return = \f$ \sqrt{a^2+b^2} \f$
*/
A_EXTERN a_float a_complex_abs(a_complex z);

/*!
 @brief computes the phase angle of a complex number
 @param z a complex number
 @return = \f$ \arctan\frac{b}{a} \f$
*/
A_EXTERN a_float a_complex_arg(a_complex z);

/* Complex arithmetic operators */

/*!
 @brief computes the projection on Riemann sphere
 @param ctx = \f$ z \f$ or \f$ (\inf,\rm{copysign}(0,b)i) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_proj(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_proj_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_proj(a_complex *ctx, a_complex z)
{
    a_complex_proj_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex conjugate
 @param ctx = \f$ (a,-b{i}) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_conj(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_conj(a_complex *ctx, a_complex z)
{
    ctx->real = +z.real;
    ctx->imag = -z.imag;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_conj_(a_complex *ctx);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_conj_(a_complex *ctx)
{
    ctx->imag = -ctx->imag;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex negative
 @param ctx = \f$ (-a,-b{i}) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_neg(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_neg(a_complex *ctx, a_complex z)
{
    ctx->real = -z.real;
    ctx->imag = -z.imag;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_neg_(a_complex *ctx);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_neg_(a_complex *ctx)
{
    ctx->real = -ctx->real;
    ctx->imag = -ctx->imag;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief addition of complex numbers \f[ (a+b i)+(c+d i)=(a+c)+(b+d)i \f]
 @param ctx = \f$ x + y \f$
 @param x complex number on the left
 @param y complex number on the right
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_add(a_complex *ctx, a_complex x, a_complex y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_add(a_complex *ctx, a_complex x, a_complex y)
{
    ctx->real = x.real + y.real;
    ctx->imag = x.imag + y.imag;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_add_(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_add_(a_complex *ctx, a_complex z)
{
    ctx->real += z.real;
    ctx->imag += z.imag;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_add_real(a_complex *ctx, a_complex x, a_float y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_add_real(a_complex *ctx, a_complex x, a_float y)
{
    ctx->real = x.real + y;
    ctx->imag = x.imag;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_add_real_(a_complex *ctx, a_float x);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_add_real_(a_complex *ctx, a_float x)
{
    ctx->real += x;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_add_imag(a_complex *ctx, a_complex x, a_float y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_add_imag(a_complex *ctx, a_complex x, a_float y)
{
    ctx->real = x.real;
    ctx->imag = x.imag + y;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_add_imag_(a_complex *ctx, a_float x);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_add_imag_(a_complex *ctx, a_float x)
{
    ctx->imag += x;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief subtraction of complex numbers \f[ (a+b i)-(c+d i)=(a-c)+(b-d)i \f]
 @param ctx = \f$ x - y \f$
 @param x complex number on the left
 @param y complex number on the right
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sub(a_complex *ctx, a_complex x, a_complex y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sub(a_complex *ctx, a_complex x, a_complex y)
{
    ctx->real = x.real - y.real;
    ctx->imag = x.imag - y.imag;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sub_(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sub_(a_complex *ctx, a_complex z)
{
    ctx->real -= z.real;
    ctx->imag -= z.imag;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sub_real(a_complex *ctx, a_complex x, a_float y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sub_real(a_complex *ctx, a_complex x, a_float y)
{
    ctx->real = x.real - y;
    ctx->imag = x.imag;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sub_real_(a_complex *ctx, a_float x);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sub_real_(a_complex *ctx, a_float x)
{
    ctx->real -= x;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sub_imag(a_complex *ctx, a_complex x, a_float y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sub_imag(a_complex *ctx, a_complex x, a_float y)
{
    ctx->real = x.real;
    ctx->imag = x.imag - y;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sub_imag_(a_complex *ctx, a_float x);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sub_imag_(a_complex *ctx, a_float x)
{
    ctx->imag -= x;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief multiplication of complex numbers \f[ (a+b i)(c+d i)=a c+b c i+a d i+b d i^{2}=(a c-b d)+(b c+a d) i \f]
 @param ctx = \f$ x \times y \f$
 @param x complex number on the left
 @param y complex number on the right
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_mul(a_complex *ctx, a_complex x, a_complex y);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_mul_(a_complex *ctx, a_complex z);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_mul(a_complex *ctx, a_complex x, a_complex y)
{
    a_complex_mul_(&x, y);
    *ctx = x;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_mul_real(a_complex *ctx, a_complex x, a_float y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_mul_real(a_complex *ctx, a_complex x, a_float y)
{
    ctx->real = x.real * y;
    ctx->imag = x.imag * y;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_mul_real_(a_complex *ctx, a_float x);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_mul_real_(a_complex *ctx, a_float x)
{
    ctx->real *= x;
    ctx->imag *= x;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_mul_imag(a_complex *ctx, a_complex x, a_float y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_mul_imag(a_complex *ctx, a_complex x, a_float y)
{
    ctx->real = -x.imag * y;
    ctx->imag = x.real * y;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_mul_imag_(a_complex *ctx, a_float x);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_mul_imag_(a_complex *ctx, a_float x)
{
    a_float const real = ctx->real;
    ctx->real = -ctx->imag * x;
    ctx->imag = real * x;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief division of complex numbers \f[ \frac{(a+b i)}{(c+d i)}=\frac{(a+b i)(c-d i)}{(c+d i)(c-d i)}=\frac{a c+b c i-a d i-b d i^{2}}{c^{2}-(d i)^{2}}=\frac{(a c+b d)+(b c-a d) i}{c^{2}+d^{2}}=\left(\frac{a c+b d}{c^{2}+d^{2}}\right)+\left(\frac{b c-a d}{c^{2}+d^{2}}\right) i \f]
 @param ctx = \f$ x \div y \f$
 @param x complex number on the left
 @param y complex number on the right
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_div(a_complex *ctx, a_complex x, a_complex y);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_div_(a_complex *ctx, a_complex z);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_div(a_complex *ctx, a_complex x, a_complex y)
{
    a_complex_div_(&x, y);
    *ctx = x;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_div_real(a_complex *ctx, a_complex x, a_float y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_div_real(a_complex *ctx, a_complex x, a_float y)
{
    ctx->real = x.real / y;
    ctx->imag = x.imag / y;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_div_real_(a_complex *ctx, a_float x);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_div_real_(a_complex *ctx, a_float x)
{
    ctx->real /= x;
    ctx->imag /= x;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_div_imag(a_complex *ctx, a_complex x, a_float y);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_div_imag(a_complex *ctx, a_complex x, a_float y)
{
    ctx->real = -x.imag / y;
    ctx->imag = x.real / y;
}
#endif /* A_HAVE_INLINE */
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_div_imag_(a_complex *ctx, a_float x);
#endif /* A_HAVE_INLINE */
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_div_imag_(a_complex *ctx, a_float x)
{
    a_float const real = ctx->real;
    ctx->real = -ctx->imag / x;
    ctx->imag = real / x;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief inverse of a complex number \f[ \frac{a-bi}{a^2+b^2}=\left(\frac{a}{a^2+b^2}\right)-\left(\frac{b}{a^2+b^2}\right)i \f]
 @param ctx inverse or reciprocal \f$ \frac{1}{z} \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_inv(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_inv_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_inv(a_complex *ctx, a_complex z)
{
    a_complex_inv_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/* Elementary Complex Functions */

/*!
 @brief computes the complex square root
 @param ctx = \f$ \sqrt{z} \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sqrt(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_sqrt_(a_complex *ctx);
A_EXTERN void a_complex_sqrt_real(a_complex *ctx, a_float x);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sqrt(a_complex *ctx, a_complex z)
{
    a_complex_sqrt_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief complex number z raised to complex power a
 @param ctx = \f$ z^a \f$
 @param z a complex number
 @param a a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_pow(a_complex *ctx, a_complex z, a_complex a);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_pow_(a_complex *ctx, a_complex a);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_pow(a_complex *ctx, a_complex z, a_complex a)
{
    a_complex_pow_(&z, a);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief complex number z raised to real power a
 @param ctx = \f$ z^a \f$
 @param z a complex number
 @param a a real number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_pow_real(a_complex *ctx, a_complex z, a_float a);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_pow_real_(a_complex *ctx, a_float a);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_pow_real(a_complex *ctx, a_complex z, a_float a)
{
    a_complex_pow_real_(&z, a);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex base-e exponential
 @param ctx = \f$ e^z \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_exp(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_exp_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_exp(a_complex *ctx, a_complex z)
{
    a_complex_exp_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex natural logarithm
 @param ctx = \f$ \ln{z} \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_log(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_log_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_log(a_complex *ctx, a_complex z)
{
    a_complex_log_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex base-2 logarithm
 @param ctx = \f$ \log_{2}{z} \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_log2(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_log2_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_log2(a_complex *ctx, a_complex z)
{
    a_complex_log2_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex base-10 logarithm
 @param ctx = \f$ \lg{z} \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_log10(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_log10_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_log10(a_complex *ctx, a_complex z)
{
    a_complex_log10_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex base-b logarithm
 @param ctx = \f$ \log_{b}{z} \f$
 @param z a complex number
 @param b a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_logb(a_complex *ctx, a_complex z, a_complex b);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_logb_(a_complex *ctx, a_complex b);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_logb(a_complex *ctx, a_complex z, a_complex b)
{
    a_complex_logb_(&z, b);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/* Complex Trigonometric Functions */

/*!
 @brief computes the complex sine \f[ \sin(z)=\frac{\exp(z{i})-\exp(-z{i})}{2{i}} \f]
 @param ctx = \f$ \sin(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sin(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_sin_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sin(a_complex *ctx, a_complex z)
{
    a_complex_sin_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex cosine \f[ \cos(z)=\frac{\exp(z{i})+\exp(-z{i})}{2} \f]
 @param ctx = \f$ \cos(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_cos(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_cos_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_cos(a_complex *ctx, a_complex z)
{
    a_complex_cos_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex tangent \f[ \tan(z)=\frac{\sin(z)}{\cos(z)} \f]
 @param ctx = \f$ \tan(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_tan(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_tan_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_tan(a_complex *ctx, a_complex z)
{
    a_complex_tan_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex secant \f[ \sec(z)=\frac{1}{\cos(z)} \f]
 @param ctx = \f$ \sec(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sec(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_sec_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sec(a_complex *ctx, a_complex z)
{
    a_complex_sec_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex cosecant \f[ \csc(z)=\frac{1}{\sin(z)} \f]
 @param ctx = \f$ \csc(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_csc(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_csc_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_csc(a_complex *ctx, a_complex z)
{
    a_complex_csc_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex cotangent \f[ \cot(z)=\frac{1}{\tan(z)} \f]
 @param ctx = \f$ \cot(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_cot(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_cot_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_cot(a_complex *ctx, a_complex z)
{
    a_complex_cot_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/* Inverse Complex Trigonometric Functions */

/*!
 @brief computes the complex arc sine
 @param ctx = \f$ \arcsin(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_asin(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_asin_(a_complex *ctx);
A_EXTERN void a_complex_asin_real(a_complex *ctx, a_float x);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_asin(a_complex *ctx, a_complex z)
{
    a_complex_asin_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc cosine
 @param ctx = \f$ \arccos(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_acos(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_acos_(a_complex *ctx);
A_EXTERN void a_complex_acos_real(a_complex *ctx, a_float x);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_acos(a_complex *ctx, a_complex z)
{
    a_complex_acos_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc tangent
 @param ctx = \f$ \arctan(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_atan(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_atan_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_atan(a_complex *ctx, a_complex z)
{
    a_complex_atan_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc secant \f[ \mathrm{arcsec}(z)=\mathrm{arccos}(\frac{1}{z}) \f]
 @param ctx = \f$ \mathrm{arcsec}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_asec(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_asec_(a_complex *ctx);
A_EXTERN void a_complex_asec_real(a_complex *ctx, a_float x);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_asec(a_complex *ctx, a_complex z)
{
    a_complex_asec_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc cosecant \f[ \mathrm{arccsc}(z)=\mathrm{arcsin}(\frac{1}{z}) \f]
 @param ctx = \f$ \mathrm{arccsc}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_acsc(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_acsc_(a_complex *ctx);
A_EXTERN void a_complex_acsc_real(a_complex *ctx, a_float x);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_acsc(a_complex *ctx, a_complex z)
{
    a_complex_acsc_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc cotangent \f[ \mathrm{arccot}(z)=\mathrm{arctan}(\frac{1}{z}) \f]
 @param ctx = \f$ \mathrm{arccot}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_acot(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_acot_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_acot(a_complex *ctx, a_complex z)
{
    a_complex_acot_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/* Complex Hyperbolic Functions */

/*!
 @brief computes the complex hyperbolic sine \f[ \sinh(z)=\frac{\exp(z)-\exp(-z)}{2} \f]
 @param ctx = \f$ \sinh(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sinh(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_sinh_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sinh(a_complex *ctx, a_complex z)
{
    a_complex_sinh_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex hyperbolic cosine \f[ \cosh(z)=\frac{\exp(z)+\exp(-z)}{2} \f]
 @param ctx = \f$ \cosh(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_cosh(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_cosh_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_cosh(a_complex *ctx, a_complex z)
{
    a_complex_cosh_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex hyperbolic tangent \f[ \tanh(z)=\frac{\sinh(z)}{\cosh(z)} \f]
 @param ctx = \f$ \tanh(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_tanh(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_tanh_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_tanh(a_complex *ctx, a_complex z)
{
    a_complex_tanh_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex hyperbolic secant \f[ \mathrm{sech}(z)=\frac{1}{\cosh(z)} \f]
 @param ctx = \f$ \mathrm{sech}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_sech(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_sech_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_sech(a_complex *ctx, a_complex z)
{
    a_complex_sech_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex hyperbolic cosecant \f[ \mathrm{csch}(z)=\frac{1}{\sinh(z)} \f]
 @param ctx = \f$ \mathrm{csch}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_csch(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_csch_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_csch(a_complex *ctx, a_complex z)
{
    a_complex_csch_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex hyperbolic cotangent \f[ \mathrm{coth}(z)=\frac{1}{\tanh(z)} \f]
 @param ctx = \f$ \mathrm{coth}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_coth(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_coth_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_coth(a_complex *ctx, a_complex z)
{
    a_complex_coth_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/* Inverse Complex Hyperbolic Functions */

/*!
 @brief computes the complex arc hyperbolic sine
 @param ctx = \f$ \mathrm{arcsinh}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_asinh(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_asinh_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_asinh(a_complex *ctx, a_complex z)
{
    a_complex_asinh_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc hyperbolic cosine \f[ \mathrm{arccosh}(z)=\log(z-\sqrt{z^2-1}) \f]
 @param ctx = \f$ \mathrm{arccosh}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_acosh(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_acosh_(a_complex *ctx);
A_EXTERN void a_complex_acosh_real(a_complex *ctx, a_float x);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_acosh(a_complex *ctx, a_complex z)
{
    a_complex_acosh_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc hyperbolic tangent
 @param ctx = \f$ \mathrm{arctanh}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_atanh(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_atanh_(a_complex *ctx);
A_EXTERN void a_complex_atanh_real(a_complex *ctx, a_float x);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_atanh(a_complex *ctx, a_complex z)
{
    a_complex_atanh_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc hyperbolic secant \f[ \mathrm{arcsech}(z)=\mathrm{arccosh}(\frac{1}{z}) \f]
 @param ctx = \f$ \mathrm{arcsech}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_asech(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_asech_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_asech(a_complex *ctx, a_complex z)
{
    a_complex_asech_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc hyperbolic cosecant \f[ \mathrm{arccsch}(z)=\mathrm{arcsinh}(\frac{1}{z}) \f]
 @param ctx = \f$ \mathrm{arccsch}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_acsch(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_acsch_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_acsch(a_complex *ctx, a_complex z)
{
    a_complex_acsch_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

/*!
 @brief computes the complex arc hyperbolic cotangent \f[ \mathrm{arccoth}(z)=\mathrm{arctanh}(\frac{1}{z}) \f]
 @param ctx = \f$ \mathrm{arccoth}(z) \f$
 @param z a complex number
*/
#if !defined A_HAVE_INLINE || defined(LIBA_COMPLEX_C)
A_EXTERN void a_complex_acoth(a_complex *ctx, a_complex z);
#endif /* A_HAVE_INLINE */
A_EXTERN void a_complex_acoth_(a_complex *ctx);
#if defined(A_HAVE_INLINE) || defined(LIBA_COMPLEX_C)
A_INTERN void a_complex_acoth(a_complex *ctx, a_complex z)
{
    a_complex_acoth_(&z);
    *ctx = z;
}
#endif /* A_HAVE_INLINE */

#if defined(LIBA_COMPLEX_C)
#undef A_INTERN
#define A_INTERN static A_INLINE
#endif /* LIBA_COMPLEX_C */
#if defined(__cplusplus)
} /* extern "C" */
#endif /* __cplusplus */

/*! @} a_complex */

#endif /* a/complex.h */