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
use melodium_macro::mel_function;

/// Return the positive infinity for floating type.
#[mel_function(
    generic F (Float)
)]
pub fn infinity() -> F {
    let f = generics.get("F").unwrap();

    f.float_infinity()
}

/// Return the negative infinity for floating type.
#[mel_function(
    generic F (Float)
)]
pub fn neg_infinity() -> F {
    let f = generics.get("F").unwrap();

    f.float_neg_infinity()
}

/// Return the not-a-number value for floating type.
#[mel_function(
    generic F (Float)
)]
pub fn nan() -> F {
    let f = generics.get("F").unwrap();

    f.float_nan()
}