]> git.lizzy.rs Git - rust.git/blob - src/libstd/sys/unix/cmath.rs
std: Move the `cmath` module into the `sys` module
[rust.git] / src / libstd / sys / unix / cmath.rs
1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #![cfg(not(test))]
12
13 use libc::{c_float, c_double};
14
15 #[link_name = "m"]
16 extern {
17     pub fn acos(n: c_double) -> c_double;
18     pub fn acosf(n: c_float) -> c_float;
19     pub fn asin(n: c_double) -> c_double;
20     pub fn asinf(n: c_float) -> c_float;
21     pub fn atan(n: c_double) -> c_double;
22     pub fn atan2(a: c_double, b: c_double) -> c_double;
23     pub fn atan2f(a: c_float, b: c_float) -> c_float;
24     pub fn atanf(n: c_float) -> c_float;
25     pub fn cbrt(n: c_double) -> c_double;
26     pub fn cbrtf(n: c_float) -> c_float;
27     pub fn cosh(n: c_double) -> c_double;
28     pub fn coshf(n: c_float) -> c_float;
29     pub fn expm1(n: c_double) -> c_double;
30     pub fn expm1f(n: c_float) -> c_float;
31     pub fn fdim(a: c_double, b: c_double) -> c_double;
32     pub fn fdimf(a: c_float, b: c_float) -> c_float;
33     pub fn hypot(x: c_double, y: c_double) -> c_double;
34     pub fn hypotf(x: c_float, y: c_float) -> c_float;
35     pub fn log1p(n: c_double) -> c_double;
36     pub fn log1pf(n: c_float) -> c_float;
37     pub fn sinh(n: c_double) -> c_double;
38     pub fn sinhf(n: c_float) -> c_float;
39     pub fn tan(n: c_double) -> c_double;
40     pub fn tanf(n: c_float) -> c_float;
41     pub fn tanh(n: c_double) -> c_double;
42     pub fn tanhf(n: c_float) -> c_float;
43 }