decimal_scaled/types/traits/
transcendental.rs1use crate::support::rounding::RoundingMode;
55
56pub trait DecimalTranscendental: Sized {
60 fn ln_strict(self) -> Self;
65 fn ln_strict_with(self, mode: RoundingMode) -> Self;
66 fn ln_approx(self, working_digits: u32) -> Self;
67 fn ln_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
68
69 fn log1p_strict(self) -> Self;
74 fn log1p_strict_with(self, mode: RoundingMode) -> Self;
75 fn log1p_approx(self, working_digits: u32) -> Self;
76 fn log1p_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
77
78 fn expm1_strict(self) -> Self;
86 fn expm1_strict_with(self, mode: RoundingMode) -> Self;
87 fn expm1_approx(self, working_digits: u32) -> Self;
88 fn expm1_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
89
90 fn log_strict(self, base: Self) -> Self;
92 fn log_strict_with(self, base: Self, mode: RoundingMode) -> Self;
93 fn log_approx(self, base: Self, working_digits: u32) -> Self;
94 fn log_approx_with(self, base: Self, working_digits: u32, mode: RoundingMode) -> Self;
95
96 fn log2_strict(self) -> Self;
98 fn log2_strict_with(self, mode: RoundingMode) -> Self;
99 fn log2_approx(self, working_digits: u32) -> Self;
100 fn log2_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
101
102 fn log10_strict(self) -> Self;
104 fn log10_strict_with(self, mode: RoundingMode) -> Self;
105 fn log10_approx(self, working_digits: u32) -> Self;
106 fn log10_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
107
108 fn exp_strict(self) -> Self;
111 fn exp_strict_with(self, mode: RoundingMode) -> Self;
112 fn exp_approx(self, working_digits: u32) -> Self;
113 fn exp_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
114
115 fn exp2_strict(self) -> Self;
116 fn exp2_strict_with(self, mode: RoundingMode) -> Self;
117 fn exp2_approx(self, working_digits: u32) -> Self;
118 fn exp2_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
119
120 fn powf_strict(self, exp: Self) -> Self;
123 fn powf_strict_with(self, exp: Self, mode: RoundingMode) -> Self;
124 fn powf_approx(self, exp: Self, working_digits: u32) -> Self;
125 fn powf_approx_with(self, exp: Self, working_digits: u32, mode: RoundingMode) -> Self;
126
127 fn sqrt_strict(self) -> Self;
133 fn sqrt_strict_with(self, mode: RoundingMode) -> Self;
134
135 fn cbrt_strict(self) -> Self;
136 fn cbrt_strict_with(self, mode: RoundingMode) -> Self;
137
138 fn hypot_strict(self, other: Self) -> Self;
139 fn hypot_strict_with(self, other: Self, mode: RoundingMode) -> Self;
140
141 fn sin_strict(self) -> Self;
144 fn sin_strict_with(self, mode: RoundingMode) -> Self;
145 fn sin_approx(self, working_digits: u32) -> Self;
146 fn sin_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
147
148 fn cos_strict(self) -> Self;
149 fn cos_strict_with(self, mode: RoundingMode) -> Self;
150 fn cos_approx(self, working_digits: u32) -> Self;
151 fn cos_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
152
153 fn tan_strict(self) -> Self;
154 fn tan_strict_with(self, mode: RoundingMode) -> Self;
155 fn tan_approx(self, working_digits: u32) -> Self;
156 fn tan_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
157
158 fn atan_strict(self) -> Self;
161 fn atan_strict_with(self, mode: RoundingMode) -> Self;
162 fn atan_approx(self, working_digits: u32) -> Self;
163 fn atan_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
164
165 fn asin_strict(self) -> Self;
166 fn asin_strict_with(self, mode: RoundingMode) -> Self;
167 fn asin_approx(self, working_digits: u32) -> Self;
168 fn asin_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
169
170 fn acos_strict(self) -> Self;
171 fn acos_strict_with(self, mode: RoundingMode) -> Self;
172 fn acos_approx(self, working_digits: u32) -> Self;
173 fn acos_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
174
175 fn atan2_strict(self, other: Self) -> Self;
178 fn atan2_strict_with(self, other: Self, mode: RoundingMode) -> Self;
179 fn atan2_approx(self, other: Self, working_digits: u32) -> Self;
180 fn atan2_approx_with(self, other: Self, working_digits: u32, mode: RoundingMode) -> Self;
181
182 fn sinh_strict(self) -> Self;
185 fn sinh_strict_with(self, mode: RoundingMode) -> Self;
186 fn sinh_approx(self, working_digits: u32) -> Self;
187 fn sinh_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
188
189 fn cosh_strict(self) -> Self;
190 fn cosh_strict_with(self, mode: RoundingMode) -> Self;
191 fn cosh_approx(self, working_digits: u32) -> Self;
192 fn cosh_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
193
194 fn tanh_strict(self) -> Self;
195 fn tanh_strict_with(self, mode: RoundingMode) -> Self;
196 fn tanh_approx(self, working_digits: u32) -> Self;
197 fn tanh_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
198
199 fn asinh_strict(self) -> Self;
200 fn asinh_strict_with(self, mode: RoundingMode) -> Self;
201 fn asinh_approx(self, working_digits: u32) -> Self;
202 fn asinh_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
203
204 fn acosh_strict(self) -> Self;
205 fn acosh_strict_with(self, mode: RoundingMode) -> Self;
206 fn acosh_approx(self, working_digits: u32) -> Self;
207 fn acosh_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
208
209 fn atanh_strict(self) -> Self;
210 fn atanh_strict_with(self, mode: RoundingMode) -> Self;
211 fn atanh_approx(self, working_digits: u32) -> Self;
212 fn atanh_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
213
214 fn to_degrees_strict(self) -> Self;
217 fn to_degrees_strict_with(self, mode: RoundingMode) -> Self;
218 fn to_degrees_approx(self, working_digits: u32) -> Self;
219 fn to_degrees_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
220
221 fn to_radians_strict(self) -> Self;
222 fn to_radians_strict_with(self, mode: RoundingMode) -> Self;
223 fn to_radians_approx(self, working_digits: u32) -> Self;
224 fn to_radians_approx_with(self, working_digits: u32, mode: RoundingMode) -> Self;
225}