pxfm/
lib.rs

1/*
2 * // Copyright (c) Radzivon Bartoshyk 6/2025. All rights reserved.
3 * //
4 * // Redistribution and use in source and binary forms, with or without modification,
5 * // are permitted provided that the following conditions are met:
6 * //
7 * // 1.  Redistributions of source code must retain the above copyright notice, this
8 * // list of conditions and the following disclaimer.
9 * //
10 * // 2.  Redistributions in binary form must reproduce the above copyright notice,
11 * // this list of conditions and the following disclaimer in the documentation
12 * // and/or other materials provided with the distribution.
13 * //
14 * // 3.  Neither the name of the copyright holder nor the names of its
15 * // contributors may be used to endorse or promote products derived from
16 * // this software without specific prior written permission.
17 * //
18 * // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 * // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22 * // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 * // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25 * // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 * // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29// #![forbid(unsafe_code)]
30#![deny(unreachable_pub)]
31#![allow(
32    clippy::excessive_precision,
33    clippy::approx_constant,
34    clippy::manual_range_contains
35)]
36#![deny(
37    clippy::print_stdout,
38    clippy::print_stderr,
39    clippy::print_literal,
40    clippy::print_in_format_impl
41)]
42mod acos;
43mod acosf;
44mod acospi;
45mod acospif;
46mod asin;
47mod asin_eval_dyadic;
48mod asinf;
49mod asinpi;
50mod asinpif;
51mod bessel;
52mod bits;
53mod common;
54mod compound;
55mod cosm1;
56mod csc;
57mod cube_roots;
58mod double_double;
59mod dyadic_float;
60mod err;
61mod exponents;
62mod gamma;
63mod hyperbolic;
64mod logs;
65mod polyeval;
66mod pow;
67mod pow_exec;
68mod pow_tables;
69mod powf;
70mod powf_tables;
71mod rounding;
72mod sec;
73mod shared_eval;
74mod sin;
75mod sin_cosf;
76mod sin_helper;
77mod sin_table;
78mod sinc;
79mod sincos;
80mod sincos_dyadic;
81mod sincos_reduce;
82mod sincos_reduce_tables;
83mod sincospi;
84mod sincospi_tables;
85mod sincpi;
86mod sinmx;
87mod square_root;
88mod tangent;
89mod triangle;
90mod triple_double;
91
92pub use acos::f_acos;
93pub use acosf::f_acosf;
94pub use acospi::f_acospi;
95pub use acospif::f_acospif;
96pub use asin::f_asin;
97pub use asinf::f_asinf;
98pub use asinpi::f_asinpi;
99pub use asinpif::f_asinpif;
100pub use bessel::{
101    f_i0, f_i0e, f_i0ef, f_i0f, f_i1, f_i1e, f_i1ef, f_i1f, f_i2, f_i2f, f_j0, f_j0f, f_j1, f_j1f,
102    f_jincpi, f_jincpif, f_k0, f_k0e, f_k0ef, f_k0f, f_k1, f_k1e, f_k1ef, f_k1f, f_k2f, f_y0,
103    f_y0f, f_y1, f_y1f,
104};
105pub use common::{copysignfk, copysignk};
106pub use compound::{f_compound, f_compound_m1, f_compound_m1f, f_compoundf, f_powm1, f_powm1f};
107pub use cosm1::f_cosm1;
108pub use csc::f_csc;
109pub use cube_roots::{cbrtf, f_cbrt, f_cbrtf, f_rcbrt, f_rcbrtf};
110pub use err::{
111    f_erf, f_erfc, f_erfcf, f_erfcinv, f_erfcinvf, f_erfcx, f_erfcxf, f_erff, f_erfinv, f_erfinvf,
112    f_rerf, f_rerff,
113};
114pub use exponents::{
115    exp, expf, f_exp, f_exp2, f_exp2f, f_exp2m1, f_exp2m1f, f_exp10, f_exp10f, f_exp10m1,
116    f_exp10m1f, f_expf, f_expm1, f_expm1f, f_logistic, f_logisticf,
117};
118pub use gamma::{
119    f_beta, f_betaf, f_betainc_reg, f_betainc_regf, f_digamma, f_digammaf, f_gamma_p, f_gamma_pf,
120    f_gamma_q, f_gamma_qf, f_lgamma, f_lgamma_r, f_lgamma_rf, f_lgammaf, f_lnbeta, f_lnbetaf,
121    f_tgamma, f_tgammaf, f_trigamma, f_trigammaf,
122};
123pub use hyperbolic::{
124    f_acosh, f_acoshf, f_asinh, f_asinhf, f_atanh, f_atanhf, f_cosh, f_coshf, f_sinh, f_sinhf,
125    f_tanh, f_tanhf,
126};
127pub use logs::{
128    f_log, f_log1p, f_log1pf, f_log1pmx, f_log1pmxf, f_log2, f_log2f, f_log2p1, f_log2p1f, f_log10,
129    f_log10f, f_log10p1, f_log10p1f, f_logf, f_logit, f_logitf, log, logf,
130};
131pub use pow::{f_pow, pow};
132pub use powf::{dirty_powf, f_powf, powf};
133pub use rounding::{ceil, ceilf};
134pub use rounding::{floor, floorf};
135pub use rounding::{rint, rintf, round, roundf, trunc, truncf};
136pub use rounding::{round_ties_even, roundf_ties_even};
137pub use sec::f_sec;
138pub use sin::{f_cos, f_sin};
139pub use sin_cosf::{
140    f_cosf, f_cosm1f, f_cospif, f_cscf, f_secf, f_sincf, f_sincosf, f_sincospif, f_sincpif, f_sinf,
141    f_sinmxf, f_sinpif,
142};
143pub use sinc::f_sinc;
144pub use sincos::f_sincos;
145pub use sincospi::{f_cospi, f_sincospi, f_sinpi};
146pub use sincpi::f_sincpi;
147pub use sinmx::f_sinmx;
148pub use square_root::{f_rsqrt, f_rsqrtf, f_sqrt1pm1, f_sqrt1pm1f, sqrtf};
149pub use tangent::{
150    f_atan, f_atan2, f_atan2f, f_atan2pi, f_atan2pif, f_atanf, f_atanpi, f_atanpif, f_cot, f_cotf,
151    f_cotpi, f_cotpif, f_tan, f_tanf, f_tanpi, f_tanpif,
152};
153pub use triangle::{f_cathetus, f_cathetusf, f_hypot, f_hypot3f, f_hypotf};