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 ceil;
54mod common;
55mod compound;
56mod cosm1;
57mod csc;
58mod cube_roots;
59mod double_double;
60mod dyadic_float;
61mod err;
62mod exponents;
63mod floor;
64mod gamma;
65mod hyperbolic;
66mod logs;
67mod polyeval;
68mod pow;
69mod pow_exec;
70mod pow_tables;
71mod powf;
72mod powf_tables;
73mod round;
74mod round_ties_even;
75mod sec;
76mod shared_eval;
77mod sin;
78mod sin_cosf;
79mod sin_helper;
80mod sin_table;
81mod sinc;
82mod sincos;
83mod sincos_dyadic;
84mod sincos_reduce;
85mod sincos_reduce_tables;
86mod sincospi;
87mod sincospi_tables;
88mod sincpi;
89mod sinmx;
90mod square_root;
91mod tangent;
92mod triangle;
93mod triple_double;
94mod trunc;
95
96pub use acos::f_acos;
97pub use acosf::f_acosf;
98pub use acospi::f_acospi;
99pub use acospif::f_acospif;
100pub use asin::f_asin;
101pub use asinf::f_asinf;
102pub use asinpi::f_asinpi;
103pub use asinpif::f_asinpif;
104pub use bessel::{
105    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,
106    f_jincpi, f_jincpif, f_k0, f_k0e, f_k0ef, f_k0f, f_k1, f_k1e, f_k1ef, f_k1f, f_k2f, f_y0,
107    f_y0f, f_y1, f_y1f,
108};
109pub use ceil::{ceil, ceilf};
110pub use common::{copysignfk, copysignk};
111pub use compound::{f_compound, f_compound_m1, f_compound_m1f, f_compoundf, f_powm1, f_powm1f};
112pub use cosm1::f_cosm1;
113pub use csc::f_csc;
114pub use cube_roots::{cbrtf, f_cbrt, f_cbrtf, f_rcbrt, f_rcbrtf};
115pub use err::{
116    f_erf, f_erfc, f_erfcf, f_erfcinv, f_erfcinvf, f_erfcx, f_erfcxf, f_erff, f_erfinv, f_erfinvf,
117    f_rerf, f_rerff,
118};
119pub use exponents::{
120    exp, expf, f_exp, f_exp2, f_exp2f, f_exp2m1, f_exp2m1f, f_exp10, f_exp10f, f_exp10m1,
121    f_exp10m1f, f_expf, f_expm1, f_expm1f, f_logistic, f_logisticf,
122};
123pub use floor::{floor, floorf};
124pub use gamma::{
125    f_beta, f_betaf, f_betainc_reg, f_betainc_regf, f_digamma, f_digammaf, f_gamma_p, f_gamma_pf,
126    f_gamma_q, f_gamma_qf, f_lgamma, f_lgamma_r, f_lgamma_rf, f_lgammaf, f_lnbeta, f_lnbetaf,
127    f_tgamma, f_tgammaf, f_trigamma, f_trigammaf,
128};
129pub use hyperbolic::{
130    f_acosh, f_acoshf, f_asinh, f_asinhf, f_atanh, f_atanhf, f_cosh, f_coshf, f_sinh, f_sinhf,
131    f_tanh, f_tanhf,
132};
133pub use logs::{
134    f_log, f_log1p, f_log1pf, f_log1pmx, f_log1pmxf, f_log2, f_log2f, f_log2p1, f_log2p1f, f_log10,
135    f_log10f, f_log10p1, f_log10p1f, f_logf, f_logit, f_logitf, log, logf,
136};
137pub use pow::{f_pow, pow};
138pub use powf::{dirty_powf, f_powf, powf};
139pub use round::{round, roundf};
140pub use round_ties_even::{round_ties_even, roundf_ties_even};
141pub use sec::f_sec;
142pub use sin::{f_cos, f_sin};
143pub use sin_cosf::{
144    f_cosf, f_cosm1f, f_cospif, f_cscf, f_secf, f_sincf, f_sincosf, f_sincospif, f_sincpif, f_sinf,
145    f_sinmxf, f_sinpif,
146};
147pub use sinc::f_sinc;
148pub use sincos::f_sincos;
149pub use sincospi::{f_cospi, f_sincospi, f_sinpi};
150pub use sincpi::f_sincpi;
151pub use sinmx::f_sinmx;
152pub use square_root::{f_rsqrt, f_rsqrtf, f_sqrt1pm1, f_sqrt1pm1f, sqrtf};
153pub use tangent::{
154    f_atan, f_atan2, f_atan2f, f_atan2pi, f_atan2pif, f_atanf, f_atanpi, f_atanpif, f_cot, f_cotf,
155    f_cotpi, f_cotpif, f_tan, f_tanf, f_tanpi, f_tanpif,
156};
157pub use triangle::{f_cathetus, f_cathetusf, f_hypot, f_hypot3f, f_hypotf};
158pub use trunc::{trunc, truncf};