1%feature("docstring") OT::SpecFunc::BesselI0
2"Modified first kind Bessel function of order 0.
3
4.. math::
5
6    \forall x \in \Rset, \quad
7    \mathrm{I}_0(x) = \sum_{m=0}^\infty\frac{1}{m!^2}\left(\frac{x}{2}\right)^{2m}
8
9Parameters
10----------
11x : float
12
13Returns
14-------
15result : float"
16
17// ---------------------------------------------------------------------
18
19%feature("docstring") OT::SpecFunc::LogBesselI0
20"Logarithm of the modified first kind Bessel function of order 0.
21
22.. math::
23
24    \forall x \in \Rset, \quad
25    LogBesselI0(x) = \log (\mathrm{I}_0(x))
26
27See also
28--------
29SpecFunc_BesselI0
30
31Parameters
32----------
33x : float
34
35Returns
36-------
37result : float"
38
39// ---------------------------------------------------------------------
40
41%feature("docstring") OT::SpecFunc::BesselI1
42"Modified first kind Bessel function of order 1.
43
44.. math::
45
46    \forall x \in \Rset, \quad
47    \mathrm{I}_1(x) = \sum_{m=0}^\infty\frac{1}{m!(m+1)!}\left(\frac{x}{2}\right)^{2m+1}
48
49Parameters
50----------
51x : float
52
53Returns
54-------
55result : float"
56
57// ---------------------------------------------------------------------
58
59%feature("docstring") OT::SpecFunc::LogBesselI1
60"Logarithm of the modified first kind Bessel function of order 1.
61
62.. math::
63
64    \forall x \in \Rset, \quad
65    LogBesselI1(x) = \log (\mathrm{I}_1(x))
66
67See also
68--------
69SpecFunc_BesselI1
70
71Parameters
72----------
73x : float
74
75Returns
76-------
77result : float"
78
79// ---------------------------------------------------------------------
80
81%feature("docstring") OT::SpecFunc::BesselK
82"Modified second kind Bessel function of order :math:`\nu`.
83
84.. math::
85
86    \forall x \in \Rset, \quad
87    \mathrm{K}_{\nu}(x) = \frac{\pi}{2}\frac{\mathrm{I}_{-\nu}(x)-\mathrm{I}_{\nu}(x)}{\sin{\nu\pi}}
88
89Parameters
90----------
91nu : float
92x : float
93
94Returns
95-------
96result : float"
97
98// ---------------------------------------------------------------------
99
100%feature("docstring") OT::SpecFunc::LogBesselK
101"Logarithm of the modified second kind Bessel function of order :math:`\nu`.
102
103.. math::
104
105    \forall x \in \Rset, \quad
106    LogBesselK(\nu, x) = \log(\mathrm{K}_{\nu}(x))
107
108See also
109--------
110SpecFunc_BesselK
111
112Parameters
113----------
114nu : float
115x : float
116
117Returns
118-------
119result : float"
120
121// ---------------------------------------------------------------------
122
123%feature("docstring") OT::SpecFunc::Beta
124"Beta function :math:`\mathrm{B}`.
125
126.. math::
127
128    \forall (a, b) > 0, \quad
129    \mathrm{B}(a, b) = \int_0^1 t^{a-1}(1-t)^{b-1}\di{t}
130
131Parameters
132----------
133a, b : float :math:`\in \Rset^*_+`
134
135Returns
136-------
137result : float"
138
139// ---------------------------------------------------------------------
140
141%feature("docstring") OT::SpecFunc::LogBeta
142"Logarithm of the Beta function.
143
144.. math::
145
146    \forall (a, b) > 0, \quad
147    LogBeta(a, b) = \log (\mathrm{B}(a, b))
148
149See also
150--------
151SpecFunc_Beta
152
153Parameters
154----------
155a, b : float :math:`\in \Rset^*_+`
156
157Returns
158-------
159result : float"
160
161// ---------------------------------------------------------------------
162
163%feature("docstring") OT::SpecFunc::LnBeta
164"Logarithm of the Beta function.
165
166.. math::
167
168    \forall (a, b) > 0,\quad
169    LnBeta(a, b) = \ln (\mathrm{B}(a, b)) = \log (\mathrm{B}(a, b))
170
171See also
172--------
173SpecFunc_Beta
174
175Parameters
176----------
177a, b : float :math:`\in \Rset^*_+`
178
179Returns
180-------
181result : float"
182
183// ---------------------------------------------------------------------
184
185%feature("docstring") OT::SpecFunc::IncompleteBeta
186"Incomplete Beta function.
187
188.. math::
189
190    \forall (a, b) > 0, t \in [0, 1], \quad
191    \mathrm{B}(x; a, b) = \int_0^x t^{a-1}(1-t)^{b-1}\di{t}
192
193Parameters
194----------
195a, b : float :math:`\in \Rset^*_+`
196x : float
197tail : bool, optional
198    By default, *tail* is *False*.
199
200Returns
201-------
202result : float
203    - If *tail* is *False*: :math:`result = \mathrm{B}(x; a, b)`.
204    - If *tail* is *True*: :math:`result = \mathrm{B}(a, b) - \mathrm{B}(x; a, b)`."
205
206// ---------------------------------------------------------------------
207
208%feature("docstring") OT::SpecFunc::IncompleteBetaInverse
209"Inverse of the incomplete Beta function.
210
211.. math::
212
213    \forall (a, b) > 0 \quad
214    IncompleteBetaInverse(x; a, b) = \mathrm{B}^{-1}(x/\mathrm{B}(a, b); a, b)
215
216See also
217--------
218SpecFunc_IncompleteBeta, SpecFunc_RegularizedIncompleteBetaInverse
219
220Parameters
221----------
222a, b : float :math:`\in \Rset^*_+`
223x : float
224tail : bool, optional
225    By default, *tail* is *False*.
226
227Returns
228-------
229result : float
230    - If *tail* is *False*: :math:`result = \mathrm{B}^{-1}(x/\mathrm{B}(a, b); a, b)`.
231    - If *tail* is *True*: :math:`result = 1 - \mathrm{B}^{-1}(x/\mathrm{B}(a, b); b, a)`."
232
233// ---------------------------------------------------------------------
234
235%feature("docstring") OT::SpecFunc::RegularizedIncompleteBeta
236"Regularized incomplete Beta function.
237
238.. math::
239
240    \forall (a, b) > 0 \quad
241    \mathrm{I}(x; a, b) = \frac{\mathrm{B}(x; a, b)}{\mathrm{B}(a, b)}
242                        = \frac{1}{\mathrm{B}(a, b)} \int_0^x t^{a-1}(1-t)^{b-1}\di{t}
243
244with :math:`B(a, b)` the Beta function and :math:`B(x; a, b)` the incomplete
245Beta function.
246
247See also
248--------
249SpecFunc_IncompleteBeta, SpecFunc_Beta
250
251Parameters
252----------
253a, b : float :math:`\in \Rset^*_+`
254x : float
255tail : bool, optional
256    By default, *tail* is *False*.
257
258Returns
259-------
260result : float
261    - If *tail* is *False*: :math:`result = \mathrm{I}(x; a, b)`.
262    - If *tail* is *True*: :math:`result = 1 - \mathrm{I}(x; a, b)`."
263
264// ---------------------------------------------------------------------
265
266%feature("docstring") OT::SpecFunc::RegularizedIncompleteBetaInverse
267"Inverse of the regularized incomplete Beta function.
268
269.. math::
270
271    \forall (a, b) > 0, \quad
272    RegularizedIncompleteBetaInverse(x; a, b) = \mathrm{I}^{-1}(x; a, b)
273
274See also
275--------
276SpecFunc_RegularizedIncompleteBeta
277
278Parameters
279----------
280a, b : float :math:`\in \Rset^*_+`
281x : float
282tail : bool, optional
283    By default, *tail* is *False*.
284
285Returns
286-------
287result : float
288    - If *tail* is *False*: :math:`result = \mathrm{I}^{-1}(x; a, b)`.
289    - If *tail* is *True*: :math:`result = 1 - \mathrm{I}^{-1}(x; b, a)`."
290
291// ---------------------------------------------------------------------
292
293%feature("docstring") OT::SpecFunc::Dawson
294"Dawson function.
295
296.. math::
297
298    \forall x \in \Cset, \quad
299    \mathrm{D}_+(x) = \exp(-x^2)\int_0^x \exp(t^2)\di{t}
300
301Parameters
302----------
303x : float or complex
304
305Returns
306-------
307result : float or complex"
308
309// ---------------------------------------------------------------------
310
311%feature("docstring") OT::SpecFunc::Debye
312"Debye function of order :math:`n`.
313
314.. math::
315
316    \forall x \in \Rset, \forall n \in \Nset^* \text{and} \, n \leq 20, \quad
317    \mathrm{D}_n(x) = \frac{n}{x^n} \int_0^x \frac{t^n}{\exp(t)-1}\di{t}
318
319Parameters
320----------
321x : float
322n : int :math:`\in \{1, \cdots, 20\}`
323
324Returns
325-------
326result : float"
327
328// ---------------------------------------------------------------------
329
330%feature("docstring") OT::SpecFunc::Ei
331"Exponential integral function.
332
333.. math::
334
335    \forall z \in \Cset, \quad
336    \mathrm{Ei}(z) = -\int_{-z}^{\infty} \frac{\exp(-t)}{t}\di{t}
337
338Parameters
339----------
340z : float or complex
341
342Returns
343-------
344result : float or complex (same as z)"
345
346// ---------------------------------------------------------------------
347
348%feature("docstring") OT::SpecFunc::Faddeeva
349"Complex Faddeeva function.
350
351.. math::
352
353    \forall x \in \Cset, \quad
354    \mathrm{W}(x) = \exp(-x^2)\mathrm{erfc}(-ix)
355
356with :math:`ErfC` the complementary error function.
357
358See also
359--------
360SpecFunc_ErfC
361
362Parameters
363----------
364x : float or complex
365
366Returns
367-------
368result : complex"
369
370// ---------------------------------------------------------------------
371
372%feature("docstring") OT::SpecFunc::FaddeevaIm
373"Imaginary part of the Faddeeva function.
374
375.. math::
376
377    \forall x \in \Rset, \quad
378    FaddeevaIm(x) = \Im (\mathrm{W}(x))
379
380See also
381--------
382SpecFunc_Faddeeva
383
384Parameters
385----------
386x : float
387
388Returns
389-------
390result : float"
391
392// ---------------------------------------------------------------------
393
394%feature("docstring") OT::SpecFunc::Gamma
395"Gamma function :math:`\Gamma`.
396
397.. math::
398
399    \forall a \in \Cset, \quad
400    \Gamma(a) = \int_0^{\infty} t^{a-1}\exp(-t)\di{t}
401
402Parameters
403----------
404a : float or complex
405
406Returns
407-------
408result : float or complex"
409
410// ---------------------------------------------------------------------
411
412%feature("docstring") OT::SpecFunc::LogGamma
413"Logarithm of the Gamma function.
414
415.. math::
416
417    \forall a \in \Cset, \quad
418    LogGamma(a) = \log (\Gamma(a))
419
420See also
421--------
422SpecFunc_Gamma
423
424Parameters
425----------
426a : float or complex
427
428Returns
429-------
430result : float or complex"
431
432// ---------------------------------------------------------------------
433
434%feature("docstring") OT::SpecFunc::LogGamma1p
435"LogGamma1p function.
436
437.. math::
438
439    \forall a \in \Rset, \quad
440    LogGamma1p(a) = \log (\Gamma(1+a))
441
442with :math:`\Gamma` the Gamma function.
443
444See also
445--------
446SpecFunc_Gamma
447
448Parameters
449----------
450a : float
451
452Returns
453-------
454result : float"
455
456// ---------------------------------------------------------------------
457
458%feature("docstring") OT::SpecFunc::LnGamma
459"Logarithm of the Gamma function.
460
461.. math::
462
463    \forall a \in \Rset, \quad
464    LnGamma(a) = \ln (\Gamma(a))
465
466See also
467--------
468SpecFunc_Gamma
469
470Parameters
471----------
472a : float
473
474Returns
475-------
476result : float"
477
478// ---------------------------------------------------------------------
479
480%feature("docstring") OT::SpecFunc::IncompleteGamma
481"Incomplete Gamma function.
482
483.. math::
484
485    \forall x \in \Rset, \quad
486    \gamma(a, x) = \int_0^x t^{a-1}\exp(-t)\di{t}
487
488Parameters
489----------
490a : float :math:`\in \Rset^*_+`
491x : float
492tail : bool, optional
493    By default, *tail* is *False*.
494
495Returns
496-------
497result : float
498    - If *tail* is *False*: :math:`result = \gamma(a, x)`.
499    - If *tail* is *True*: :math:`result = \Gamma(a) - \gamma(a, x)`."
500
501// ---------------------------------------------------------------------
502
503%feature("docstring") OT::SpecFunc::IncompleteGammaInverse
504"Inverse of the incomplete Gamma function with respect to :math:`x`.
505
506.. math::
507
508    IncompleteGammaInverse(a, x) = \gamma^{-1}(a, x)
509
510See also
511--------
512SpecFunc_IncompleteGamma
513
514Parameters
515----------
516a : float :math:`\in \Rset^*_+`
517x : float
518tail : bool, optional
519    By default, *tail* is *False*.
520
521Returns
522-------
523result : float
524    - If *tail* is *False*: :math:`result = \mathrm{P}^{-1}(a, x/\Gamma(a))`.
525    - If *tail* is *True*: :math:`result = \mathrm{P}^{-1}(a, (1-x)/\Gamma(a))`."
526
527// ---------------------------------------------------------------------
528
529%feature("docstring") OT::SpecFunc::RegularizedIncompleteGamma
530"Regularized incomplete Gamma function.
531
532.. math::
533
534    \forall x \in \Rset, \quad
535    \mathrm{P}(a, x) = \frac{\gamma(a, x)}{\Gamma(a)}
536                     = \frac{1}{\Gamma(a)}\int_0^x t^{a-1}\exp(-t)\di{t}
537
538See also
539--------
540SpecFunc_Gamma, SpecFunc_IncompleteGamma
541
542Parameters
543----------
544a : float :math:`\in \Rset^*_+`
545x : float
546tail : bool, optional
547    By default, *tail* is *False*.
548
549Returns
550-------
551result : float
552    - If *tail* is *False*: :math:`result = \mathrm{P}(a, x)`.
553    - If *tail* is *True*: :math:`result = \Gamma(a) - \mathrm{P}(a, x)`."
554
555// ---------------------------------------------------------------------
556
557%feature("docstring") OT::SpecFunc::RegularizedIncompleteGammaInverse
558"Inverse of the regularized incomplete Gamma function.
559
560.. math::
561
562    \forall x \in \Rset, \quad
563    RegularizedIncompleteGammaInverse(a, x) = \mathrm{P}^{-1}(a, x)
564
565See also
566--------
567SpecFunc_Gamma, SpecFunc_RegularizedIncompleteGamma
568
569Parameters
570----------
571a : float :math:`\in \Rset^*_+`
572x : float :math:`\in [0, 1]`
573tail : bool, optional
574    By default, *tail* is *False*.
575
576Returns
577-------
578result : float
579    - If *tail* is *False*: :math:`result = \mathrm{P}^{-1}(a, x)`.
580    - If *tail* is *True*: :math:`result = \mathrm{P}^{-1}(a, 1-x)`."
581
582// ---------------------------------------------------------------------
583
584%feature("docstring") OT::SpecFunc::DiGamma
585"Digamma function.
586
587.. math::
588
589    \Psi(x) = \frac{1}{\Gamma(x)}\frac{\mathrm{d} \Gamma(x)}{\mathrm{d}x}
590
591with :math:`\Gamma` the Gamma function.
592
593See also
594--------
595SpecFunc_Gamma
596
597Parameters
598----------
599x : float :math:`\in \Rset^*_+`
600
601Returns
602-------
603result : float"
604
605// ---------------------------------------------------------------------
606
607%feature("docstring") OT::SpecFunc::Psi
608"Psi function.
609
610.. math::
611
612    \Psi(x) = \frac{1}{\Gamma(x)}\frac{\mathrm{d} \Gamma(x)}{\mathrm{d}x}
613
614with :math:`\Gamma` the Gamma function.
615
616See also
617--------
618SpecFunc_Gamma
619
620Parameters
621----------
622x : float :math:`\in \Rset^*_+`
623
624Returns
625-------
626result : float"
627
628// ---------------------------------------------------------------------
629
630%feature("docstring") OT::SpecFunc::DiGammaInv
631"Inverse of the DiGamma function.
632
633.. math::
634
635    DiGammaInv(x) = \Psi^{-1} (x)
636
637See also
638--------
639SpecFunc_DiGamma
640
641Parameters
642----------
643x : float
644
645Returns
646-------
647result : float"
648
649// ---------------------------------------------------------------------
650
651%feature("docstring") OT::SpecFunc::TriGamma
652"TriGamma function.
653
654.. math::
655
656    \Psi_1(x) = \frac{1}{\Gamma(x)}\frac{\mathrm{d}^2 \Gamma(x)}{\mathrm{d}x^2}
657
658with :math:`\Gamma` the Gamma function.
659
660See also
661--------
662SpecFunc_Gamma
663
664Parameters
665----------
666x : float :math:`\in \Rset^*_+`
667
668Returns
669-------
670result : float"
671
672// ---------------------------------------------------------------------
673
674%feature("docstring") OT::SpecFunc::IGamma1pm1
675"IGamma1pm1 function.
676
677.. math::
678
679    \forall x \in \Rset, \quad
680    IGamma1pm1(a, x) = \int_0^x t^{a-1}\exp(-t)\di{t}
681
682Parameters
683----------
684x : float
685
686Returns
687-------
688result : float"
689
690// ---------------------------------------------------------------------
691
692%feature("docstring") OT::SpecFunc::GammaCorrection
693"GammaCorrection function.
694
695.. math::
696
697    \forall x \in \Rset^*_+, \quad
698    GammaCorrection(a) = \log (\Gamma(a)) - \log (\sqrt{2\Pi}) + a - (a - 0.5) \log(a)
699
700with :math:`\Gamma` the Gamma function.
701
702See also
703--------
704SpecFunc_Gamma
705
706Parameters
707----------
708a : float :math:`\in \Rset^*_+`
709
710Returns
711-------
712result : float"
713
714// ---------------------------------------------------------------------
715
716%feature("docstring") OT::SpecFunc::HyperGeom_1_1
717"Hypergeometric function of type (1,1).
718
719.. math::
720
721    {}_1F_1(p_1, q_1, x) = \sum_{n=0}^{\infty}
722                           \left[
723                           \prod_{k=0}^{n-1} \frac{(p_1 + k)}{(q_1 + k)}
724                           \right]  \frac{x^n}{n!}
725
726Parameters
727----------
728p1, q1 : float
729x : float or complex
730
731Returns
732-------
733result : float or complex"
734
735// ---------------------------------------------------------------------
736
737%feature("docstring") OT::SpecFunc::HyperGeom_2_1
738"Hypergeometric function of type (2,1).
739
740.. math::
741
742    {}_2F_1(p_1, p_2, q_1, x) = \sum_{n=0}^{\infty}
743                                \left[
744                                \prod_{k=0}^{n-1} \frac{(p_1 + k)(p_2 + k)}{(q_1 + k)}
745                                \right] \frac{x^n}{n!}
746
747Parameters
748----------
749p1, p2, q1, x : float
750
751Returns
752-------
753result : float"
754
755// ---------------------------------------------------------------------
756
757%feature("docstring") OT::SpecFunc::HyperGeom_2_2
758"Hypergeometric function of type (2,2).
759
760.. math::
761
762    {}_2F_2(p_1, p_2, q_1, q_2, x) = \sum_{n=0}^{\infty}
763                         \left[
764                         \prod_{k=0}^{n-1} \frac{(p_1 + k)(p_2 + k)}{(q_1 + k) (q_2 + k)}
765                         \right] \frac{x^n}{n!}
766
767Parameters
768----------
769p1, p2, q1, q2, x : float
770
771Returns
772-------
773result : float"
774
775// ---------------------------------------------------------------------
776
777%feature("docstring") OT::SpecFunc::Erf
778"Error function Erf.
779
780.. math::
781
782    \forall x \in \Cset, \quad
783    Erf(x) = \frac{2}{\sqrt{\pi}} \int_0^x \exp(-t^2)\di{t}
784
785Parameters
786----------
787x : float or complex
788
789Returns
790-------
791result : float or complex"
792
793// ---------------------------------------------------------------------
794
795%feature("docstring") OT::SpecFunc::ErfC
796"Complementary error function ErfC.
797
798.. math::
799
800    \forall x \in \Cset, \quad
801    ErfC(x) = 1 - Erf(x)
802
803with :math:`Erf` the error function.
804
805See also
806--------
807SpecFunc_Erf
808
809Parameters
810----------
811x : float or complex
812
813Returns
814-------
815result : float or complex"
816
817// ---------------------------------------------------------------------
818
819%feature("docstring") OT::SpecFunc::ErfInverse
820"Inverse of the error function Erf.
821
822.. math::
823
824    \forall x \in \Cset, \quad
825    ErfInverse(x) = Erf^{-1} (x)
826
827See also
828--------
829SpecFunc_Erf
830
831Parameters
832----------
833x : float
834
835Returns
836-------
837result : float"
838
839// ---------------------------------------------------------------------
840
841%feature("docstring") OT::SpecFunc::ErfCX
842"ErfCX function.
843
844.. math::
845
846    \forall x \in \Cset, \quad
847    ErfCX(x) = \exp(x^2).ErfC(x)
848
849with :math:`ErfC` the complementary error function.
850
851See also
852--------
853SpecFunc_ErfC
854
855Parameters
856----------
857x : float or complex
858
859Returns
860-------
861result : float or complex"
862
863// ---------------------------------------------------------------------
864
865%feature("docstring") OT::SpecFunc::ErfI
866"Imaginary error function ErfI.
867
868.. math::
869
870    \forall x \in \Cset, \quad
871    ErfI(x) = -i Erf(ix)
872
873with :math:`Erf` the error function.
874
875See also
876--------
877SpecFunc_Erf
878
879Parameters
880----------
881x : float or complex
882
883Returns
884-------
885result : float or complex"
886
887// ---------------------------------------------------------------------
888
889%feature("docstring") OT::SpecFunc::Log1MExp
890"Log1MExp function.
891
892.. math::
893
894    \forall x \in \Rset^+, \quad
895    Log1MExp(x) = \log (1-\exp(-x))
896
897Parameters
898----------
899x : float :math:`\in \Rset^*_+`
900
901Returns
902-------
903result : complex"
904
905// ---------------------------------------------------------------------
906
907%feature("docstring") OT::SpecFunc::Expm1
908"Expm1 function.
909
910.. math::
911
912    \forall x \in \Cset, \quad
913    Expm1(x) = \exp(x)-1
914
915Parameters
916----------
917x : float or complex
918
919Returns
920-------
921result : complex"
922
923// ---------------------------------------------------------------------
924
925%feature("docstring") OT::SpecFunc::Log1p
926"Log1p function.
927
928.. math::
929
930    \forall x \in \Cset, \quad
931    Log1p(x) = \log (1+x)
932
933Parameters
934----------
935x : float or complex
936
937Returns
938-------
939result : complex"
940
941// ---------------------------------------------------------------------
942
943%feature("docstring") OT::SpecFunc::DiLog
944"Dilogarithm function.
945
946.. math::
947
948    \forall x \in ]-\infty, 1[, \quad
949    Li_2(x) = -\int_0^x \frac{\log (1-t)}{t}\di{t}
950
951Parameters
952----------
953x : float :math:`\in ]-\infty, 1[`
954
955Returns
956-------
957result : float"
958
959// ---------------------------------------------------------------------
960
961%feature("docstring") OT::SpecFunc::IPow
962"Raise the given :math:`x` to the integral power :math:`n`.
963
964.. math::
965
966    IPow(x, n) = x^n
967
968Parameters
969----------
970n : int
971x : float
972
973Returns
974-------
975result : foat
976
977Examples
978--------
979>>> import openturns as ot
980>>> ot.SpecFunc.IPow(-2.5, 3)
981-15.625"
982
983// ---------------------------------------------------------------------
984
985%feature("docstring") OT::SpecFunc::IRoot
986"Extract the :math:`n` integral root of the given :math:`x`.
987
988.. math::
989
990    IRoot(x, n) = \sqrt[n]{x}
991
992Parameters
993----------
994n : int
995x : float
996
997Returns
998-------
999result : foat
1000
1001Examples
1002--------
1003>>> import openturns as ot
1004>>> ot.SpecFunc.IRoot(-15.625, 3)
1005-2.5"
1006
1007// ---------------------------------------------------------------------
1008
1009%feature("docstring") OT::SpecFunc::NextPowerOfTwo
1010"Smallest power of two greater or equal to the given :math:`n`.
1011
1012.. math::
1013
1014    NextPowerOfTwo(n) = 2^{\lceil \log_2(n)\rceil}
1015
1016Parameters
1017----------
1018n : positive int
1019
1020Returns
1021-------
1022result : positive int
1023
1024Examples
1025--------
1026>>> import openturns as ot
1027>>> int(ot.SpecFunc.NextPowerOfTwo(42))
102864"
1029
1030// ---------------------------------------------------------------------
1031
1032%feature("docstring") OT::SpecFunc::Log2
1033"Integer base 2 logarithm of :math:`n`.
1034
1035.. math::
1036
1037    Log2(n) = \log_2(n)
1038
1039Parameters
1040----------
1041n : positive int
1042
1043Returns
1044-------
1045result : positive int
1046
1047Examples
1048--------
1049>>> import openturns as ot
1050>>> int(ot.SpecFunc.Log2(42))
10515"
1052
1053// ---------------------------------------------------------------------
1054
1055%feature("docstring") OT::SpecFunc::BitCount
1056"Compute the number of bits set to 1 in an integer.
1057
1058Parameters
1059----------
1060n : positive int
1061
1062Returns
1063-------
1064result : positive int
1065
1066Examples
1067--------
1068>>> import openturns as ot
1069>>> int(ot.SpecFunc.BitCount(42))
10703"
1071
1072// ---------------------------------------------------------------------
1073
1074%feature("docstring") OT::SpecFunc::LambertW
1075"Lambert W function.
1076
1077The Lambert W function :math:`\mathrm{W}(x)` is defined by the relation:
1078
1079.. math::
1080
1081    x = \mathrm{W}(x) \exp(\mathrm{W}(x))
1082
1083Parameters
1084----------
1085x : float
1086principal : bool, optional
1087    By default, *principal* is *True*.
1088
1089Returns
1090-------
1091result : float
1092    - If *principal* is *True* : :math:`result = \mathrm{W}_0(x)`.
1093      :math:`\mathrm{W}_0(x)` is referred to as the principal branch of the Lambert W
1094      function. It denotes the upper part of the function whose domain is
1095      :math:`[-1/e, +\infty[` and range :math:`[-1, +\infty[`.
1096    - If *principal* is *False* : :math:`result = \mathrm{W}_{-1}(x)`.
1097      :math:`\mathrm{W}_{-1}(x)` is the second real branch of the Lambert W function.
1098      It denotes the lower part of the function whose domain is
1099      :math:`[-1/e, 0[` and range :math:`]-\infty, -1]`."
1100
1101// ---------------------------------------------------------------------
1102
1103%feature("docstring") OT::SpecFunc::Cbrt
1104"Cubit root function.
1105
1106Parameters
1107----------
1108x : float
1109
1110Returns
1111-------
1112result : float"
1113
1114// ---------------------------------------------------------------------
1115
1116%feature("docstring") OT::SpecFunc::BinomialCoefficient
1117"Binomial coefficient.
1118
1119Returns the value :math:`C_k^n = \binom{n}{k}`
1120
1121Parameters
1122----------
1123n : int
1124k : int
1125
1126Returns
1127-------
1128result : int"
1129
1130// ---------------------------------------------------------------------
1131
1132%feature("docstring") OT::SpecFunc::IsNormal
1133"Check for non-NaN and non-Inf values.
1134
1135Parameters
1136----------
1137v : float
1138
1139Returns
1140-------
1141result : bool"
1142
1143// ---------------------------------------------------------------------
1144
1145%feature("docstring") OT::SpecFunc::LogFactorial
1146"Logarithm of the factorial function.
1147
1148.. math::
1149
1150    \forall n \in \Nset, \quad
1151    LogFactorial(n) = \log(n!)
1152
1153See also
1154--------
1155SpecFunc_Stirlerr
1156
1157Parameters
1158----------
1159n : int
1160
1161Returns
1162-------
1163result : float"
1164
1165// ---------------------------------------------------------------------
1166
1167%feature("docstring") OT::SpecFunc::Stirlerr
1168"Error of the Stirling approximation of the factorial logarithm.
1169
1170.. math::
1171
1172    \forall n \in \Nset, \quad
1173    Stirlerr(n) = \log(n!) - \log\left(sqrt{2\pi n}\left(\dfrac{n}{e}\right)^n\right)
1174
1175See also
1176--------
1177SpecFunc_LogFactorial
1178
1179Parameters
1180----------
1181n : int
1182
1183Returns
1184-------
1185result : float"
1186
1187// ---------------------------------------------------------------------
1188
1189%feature("docstring") OT::SpecFunc::IsBoostAvailable
1190"Check for Boost availability.
1191
1192Returns
1193-------
1194result : bool"
1195
1196// ---------------------------------------------------------------------
1197
1198%feature("docstring") OT::SpecFunc::IsMPFRAvailable
1199"Check for MPFR availability.
1200
1201Returns
1202-------
1203result : bool"
1204
1205// ---------------------------------------------------------------------
1206
1207%feature("docstring") OT::SpecFunc::IsMPCAvailable
1208"Check for MPC availability.
1209
1210Returns
1211-------
1212result : bool"
1213
1214