Comments only: associate FIXMEs in float libs with issue numbers
This commit is contained in:
parent
0972571cdd
commit
43b457c5d6
@ -55,6 +55,7 @@ pure fn gt(x: f32, y: f32) -> bool { ret x > y; }
|
||||
|
||||
// FIXME replace the predicates below with llvm intrinsics or calls
|
||||
// to the libmath macros in the rust runtime for performance
|
||||
// See Issue #1999
|
||||
|
||||
#[doc = "
|
||||
Returns true if `x` is a positive number, including +0.0f320 and +Infinity
|
||||
@ -104,11 +105,13 @@ pure fn is_finite(x: f32) -> bool {
|
||||
}
|
||||
|
||||
// FIXME add is_normal, is_subnormal, and fpclassify
|
||||
// also see Issue #1999
|
||||
|
||||
/* Module: consts */
|
||||
mod consts {
|
||||
|
||||
// FIXME replace with mathematical constants from cmath
|
||||
// (requires Issue #1433 to fix)
|
||||
#[doc = "Archimedes' constant"]
|
||||
const pi: f32 = 3.14159265358979323846264338327950288_f32;
|
||||
|
||||
@ -157,13 +160,14 @@ pure fn signbit(x: f32) -> int {
|
||||
#[cfg(target_os="macos")]
|
||||
#[cfg(target_os="win32")]
|
||||
pure fn logarithm(n: f32, b: f32) -> f32 {
|
||||
// FIXME check if it is good to use log2 instead of ln here;
|
||||
// in theory should be faster since the radix is 2
|
||||
ret log2(n) / log2(b);
|
||||
}
|
||||
|
||||
#[cfg(target_os="freebsd")]
|
||||
pure fn logarithm(n: f32, b: f32) -> f32 {
|
||||
// FIXME check if it is good to use log2 instead of ln here;
|
||||
// in theory should be faster since the radix is 2
|
||||
// See Issue #2000
|
||||
ret ln(n) / ln(b);
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,9 @@
|
||||
import cmath::c_double::*;
|
||||
import cmath::c_double_targ_consts::*;
|
||||
|
||||
// FIXME find out why these have to be exported explicitly
|
||||
|
||||
// Even though this module exports everything defined in it,
|
||||
// because it contains re-exports, we also have to explicitly
|
||||
// export locally defined things. That's a bit annoying.
|
||||
export add, sub, mul, div, rem, lt, le, gt, eq, eq, ne;
|
||||
export is_positive, is_negative, is_nonpositive, is_nonnegative;
|
||||
export is_zero, is_infinite, is_finite;
|
||||
@ -27,6 +28,7 @@ export epsilon;
|
||||
// PORT check per architecture
|
||||
|
||||
// FIXME obtain these in a different way
|
||||
// (perhaps related to Issue #1433)
|
||||
|
||||
const radix: uint = 2u;
|
||||
|
||||
@ -120,12 +122,13 @@ pure fn is_finite(x: f64) -> bool {
|
||||
}
|
||||
|
||||
// FIXME add is_normal, is_subnormal, and fpclassify
|
||||
// also see Issue #1999
|
||||
|
||||
/* Module: consts */
|
||||
mod consts {
|
||||
|
||||
// FIXME replace with mathematical constants from cmath
|
||||
|
||||
// (requires Issue #1433 to fix)
|
||||
#[doc = "Archimedes' constant"]
|
||||
const pi: f64 = 3.14159265358979323846264338327950288_f64;
|
||||
|
||||
@ -174,13 +177,14 @@ pure fn signbit(x: f64) -> int {
|
||||
#[cfg(target_os="macos")]
|
||||
#[cfg(target_os="win32")]
|
||||
pure fn logarithm(n: f64, b: f64) -> f64 {
|
||||
// FIXME check if it is good to use log2 instead of ln here;
|
||||
// in theory should be faster since the radix is 2
|
||||
ret log2(n) / log2(b);
|
||||
}
|
||||
|
||||
#[cfg(target_os="freebsd")]
|
||||
pure fn logarithm(n: f64, b: f64) -> f64 {
|
||||
// FIXME check if it is good to use log2 instead of ln here;
|
||||
// in theory should be faster since the radix is 2
|
||||
// See Issue #2000
|
||||
ret ln(n) / ln(b);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
#[doc = "Operations and constants for `float`"];
|
||||
|
||||
// FIXME find out why these have to be exported explicitly
|
||||
|
||||
// Even though this module exports everything defined in it,
|
||||
// because it contains re-exports, we also have to explicitly
|
||||
// export locally defined things. That's a bit annoying.
|
||||
export to_str_common, to_str_exact, to_str, from_str;
|
||||
export add, sub, mul, div, rem, lt, le, gt, eq, eq, ne;
|
||||
export is_positive, is_negative, is_nonpositive, is_nonnegative;
|
||||
|
Loading…
x
Reference in New Issue
Block a user