summaryrefslogtreecommitdiffstats
path: root/test cases/rust/14 external libm/rs_math.rs
blob: ef53a5c3e83681b78e86c10953088543a973a1bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![crate_name = "rs_math"]

use std::os::raw::c_double;

extern "C" {
    fn log2(n: c_double) -> c_double;
}

#[no_mangle]
pub extern fn rs_log2(n: c_double) -> c_double {
    unsafe { log2(n) }
}