forked from rust-lang/libm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.rs
More file actions
99 lines (87 loc) · 1.23 KB
/
Copy pathmain.rs
File metadata and controls
99 lines (87 loc) · 1.23 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#![feature(int_to_from_bytes)]
extern crate libm;
extern crate shared;
use std::error::Error;
use std::fs::File;
use std::io::Write;
#[macro_use]
mod macros;
fn main() -> Result<(), Box<Error>> {
f32! {
acosf,
asinf,
atanf,
cbrtf,
ceilf,
cosf,
coshf,
exp2f,
expf,
expm1f,
fabsf,
floorf,
log10f,
log1pf,
log2f,
logf,
roundf,
sinf,
sinhf,
sqrtf,
tanf,
tanhf,
truncf,
}
f32f32! {
atan2f,
fdimf,
fmodf,
hypotf,
powf,
}
f32i32! {
scalbnf,
}
f32f32f32! {
fmaf,
}
f64! {
acos,
asin,
atan,
cbrt,
ceil,
cos,
cosh,
exp,
exp2,
expm1,
fabs,
floor,
log,
log10,
log1p,
log2,
round,
sin,
sinh,
sqrt,
tan,
tanh,
trunc,
}
f64f64! {
atan2,
fdim,
fmod,
hypot,
pow,
}
f64i32! {
scalbn,
}
f64f64f64! {
fma,
}
Ok(())
}