1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/// Calculates the power of a base raised to an exponent.
///
/// # Examples
///
/// ```
/// let result = powf(2.0, 3);
/// assert_eq!(result, 8.0);
///
/// let result = powf(5.0, -2);
/// assert_eq!(result, 0.04);
///
/// let result = powf(2.0, 0);
/// assert_eq!(result, 1.0);
/// ```
///
/// # Parameters
///
/// - `base`: The base number to be raised.
/// - `exponent`: The exponent to which the base is raised. Can be positive, negative, or zero.
///
/// # Returns
///
/// The result of raising the base to the given exponent.