mixed_num/float_impl/
f32_impl.rs

1use super::*;
2
3impl MixedSin for f32
4{
5    #[inline(always)]
6    fn mixed_sin(&self) -> Self {
7        return libm::sinf(*self);
8    }
9    #[inline(always)]
10    fn mixed_sincos(&self) -> (Self, Self) 
11        where Self: Sized
12    {
13        return libm::sincosf(*self);
14    }   
15    #[inline(always)]
16    fn mixed_asin(&self) -> Self {
17        return libm::asinf(*self);
18    }
19}
20
21impl MixedSinh for f32
22{
23    #[inline(always)]
24    fn mixed_sinh(&self) -> Self {
25        return libm::sinhf(*self);
26    }
27    #[inline(always)]
28    fn mixed_asinh(&self) -> Self {
29        return libm::asinhf(*self);
30    }
31}
32
33impl MixedCos for f32
34{
35    #[inline(always)]
36    fn mixed_cos(&self) -> Self {
37        return libm::cosf(*self);
38    }
39    #[inline(always)]
40    fn mixed_acos(&self) -> Self {
41        return libm::acosf(*self);
42    }
43}
44
45impl MixedCosh for f32
46{
47    #[inline(always)]
48    fn mixed_cosh(&self) -> Self {
49        return libm::coshf(*self);
50    }
51    #[inline(always)]
52    fn mixed_acosh(&self) -> Self {
53        return libm::acoshf(*self);
54    }
55}
56
57impl MixedTrigonometry for f32
58{ 
59}
60
61impl MixedTan for f32
62{
63    #[inline(always)]
64    fn mixed_tan(&self) -> Self {
65        return libm::tanf(*self);
66    }
67}
68
69impl MixedTanh for f32
70{
71    #[inline(always)]
72    fn mixed_tanh(&self) -> Self {
73        return libm::tanhf(*self);
74    }
75    #[inline(always)]
76    fn mixed_atanh(&self) -> Self {
77        return libm::atanhf(*self);
78    }
79}
80
81impl MixedAtan for f32
82{
83    #[inline(always)]
84    fn mixed_atan(&self) -> Self {
85        return libm::atanf(*self);
86    }
87    #[inline(always)]
88    fn mixed_atan2(&self, other:Self) -> Self {
89        return libm::atan2f(*self,other);
90    }
91    #[inline(always)]
92    fn mixed_atan2_poly(&self, other:Self) -> Self {
93        return trigonometry::atan::atan2(*self, other);
94    }
95}
96
97impl MixedSqrt for f32
98{
99    #[inline(always)]
100    fn mixed_sqrt(&self) -> Self {
101        return libm::sqrtf(*self);
102    }
103
104    #[inline(always)]
105    fn mixed_niirf(&self) -> Self {
106        return trigonometry::sqrt::niirf(*self, 2);
107    }
108}
109
110impl MixedCbrt for f32
111{
112    #[inline(always)]
113    fn mixed_cbrt(&self) -> Self {
114        return libm::cbrtf(*self);
115    }
116}
117
118impl MixedCeil for f32
119{
120    #[inline(always)]
121    fn mixed_ceil(&self) -> Self {
122        return libm::ceilf(*self);
123    }
124}
125impl MixedFloor for f32
126{
127    #[inline(always)]
128    fn mixed_floor(&self) -> Self {
129        return libm::floorf(*self);
130    }
131}
132
133impl MixedExp for f32
134{
135    #[inline(always)]
136    fn mixed_exp(&self) -> Self {
137        return libm::expf(*self);
138    }
139}
140
141impl MixedExp10 for f32
142{
143    #[inline(always)]
144    fn mixed_exp10(&self) -> Self {
145        return libm::exp10f(*self);
146    }
147}
148
149impl MixedExp2 for f32
150{
151    #[inline(always)]
152    fn mixed_exp2(&self) -> Self {
153        return libm::exp2f(*self);
154    }
155}
156
157impl MixedPow for f32
158{
159    #[inline(always)]
160    fn mixed_pow(&self, power:f32) -> Self {
161        return libm::powf(*self, power);
162    }
163}
164
165impl Mixedlog for f32
166{
167    #[inline(always)]
168    fn mixed_log(&self) -> Self {
169        return libm::logf(*self);
170    }
171}
172
173impl Mixedlog10 for f32
174{
175    #[inline(always)]
176    fn mixed_log10(&self) -> Self {
177        return libm::log10f(*self);
178    }
179}
180
181impl Mixedlog2 for f32
182{
183    #[inline(always)]
184    fn mixed_log2(&self) -> Self {
185        return libm::log2f(*self);
186    }
187}