Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
8bef0a36
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8bef0a36
编写于
5月 04, 2020
作者:
S
Steve Klabnik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
f64 examples
上级
d38d429b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
147 addition
and
0 deletion
+147
-0
src/libcore/num/f64.rs
src/libcore/num/f64.rs
+147
-0
未找到文件。
src/libcore/num/f64.rs
浏览文件 @
8bef0a36
...
...
@@ -18,15 +18,46 @@
/// The radix or base of the internal representation of `f64`.
/// Use [`f64::RADIX`](../../std/primitive.f64.html#associatedconstant.RADIX) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let r = std::f64::RADIX;
///
/// // intended way
/// let r = f64::RADIX;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
RADIX
:
u32
=
f64
::
RADIX
;
/// Number of significant digits in base 2.
/// Use [`f64::MANTISSA_DIGITS`](../../std/primitive.f64.html#associatedconstant.MANTISSA_DIGITS) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let d = std::f64::MANTISSA_DIGITS;
///
/// // intended way
/// let d = f64::MANTISSA_DIGITS;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
MANTISSA_DIGITS
:
u32
=
f64
::
MANTISSA_DIGITS
;
/// Approximate number of significant digits in base 10.
/// Use [`f64::DIGITS`](../../std/primitive.f64.html#associatedconstant.DIGITS) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let d = std::f64::DIGITS;
///
/// // intended way
/// let d = f64::DIGITS;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
DIGITS
:
u32
=
f64
::
DIGITS
;
...
...
@@ -36,50 +67,166 @@
/// This is the difference between `1.0` and the next larger representable number.
///
/// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let e = std::f64::EPSILON;
///
/// // intended way
/// let e = f64::EPSILON;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
EPSILON
:
f64
=
f64
::
EPSILON
;
/// Smallest finite `f64` value.
/// Use [`f64::MIN`](../../std/primitive.f64.html#associatedconstant.MIN) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let min = std::f64::MIN;
///
/// // intended way
/// let min = f64::MIN;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
MIN
:
f64
=
f64
::
MIN
;
/// Smallest positive normal `f64` value.
/// Use [`f64::MIN_POSITIVE`](../../std/primitive.f64.html#associatedconstant.MIN_POSITIVE) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let min = std::f64::MIN_POSITIVE;
///
/// // intended way
/// let min = f64::MIN_POSITIVE;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
MIN_POSITIVE
:
f64
=
f64
::
MIN_POSITIVE
;
/// Largest finite `f64` value.
/// Use [`f64::MAX`](../../std/primitive.f64.html#associatedconstant.MAX) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let max = std::f64::MAX;
///
/// // intended way
/// let max = f64::MAX;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
MAX
:
f64
=
f64
::
MAX
;
/// One greater than the minimum possible normal power of 2 exponent.
/// Use [`f64::MIN_EXP`](../../std/primitive.f64.html#associatedconstant.MIN_EXP) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let min = std::f64::MIN_EXP;
///
/// // intended way
/// let min = f64::MIN_EXP;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
MIN_EXP
:
i32
=
f64
::
MIN_EXP
;
/// Maximum possible power of 2 exponent.
/// Use [`f64::MAX_EXP`](../../std/primitive.f64.html#associatedconstant.MAX_EXP) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let max = std::f64::MAX_EXP;
///
/// // intended way
/// let max = f64::MAX_EXP;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
MAX_EXP
:
i32
=
f64
::
MAX_EXP
;
/// Minimum possible normal power of 10 exponent.
/// Use [`f64::MIN_10_EXP`](../../std/primitive.f64.html#associatedconstant.MIN_10_EXP) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let min = std::f64::MIN_10_EXP;
///
/// // intended way
/// let min = f64::MIN_10_EXP;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
MIN_10_EXP
:
i32
=
f64
::
MIN_10_EXP
;
/// Maximum possible power of 10 exponent.
/// Use [`f64::MAX_10_EXP`](../../std/primitive.f64.html#associatedconstant.MAX_10_EXP) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let max = std::f64::MAX_10_EXP;
///
/// // intended way
/// let max = f64::MAX_10_EXP;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
MAX_10_EXP
:
i32
=
f64
::
MAX_10_EXP
;
/// Not a Number (NaN).
/// Use [`f64::NAN`](../../std/primitive.f64.html#associatedconstant.NAN) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let nan = std::f64::NAN;
///
/// // intended way
/// let nan = f64::NAN;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
NAN
:
f64
=
f64
::
NAN
;
/// Infinity (∞).
/// Use [`f64::INFINITY`](../../std/primitive.f64.html#associatedconstant.INFINITY) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let inf = std::f64::INFINITY;
///
/// // intended way
/// let inf = f64::INFINITY;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
INFINITY
:
f64
=
f64
::
INFINITY
;
/// Negative infinity (−∞).
/// Use [`f64::NEG_INFINITY`](../../std/primitive.f64.html#associatedconstant.NEG_INFINITY) instead.
///
/// # Examples
///
/// ```rust
/// // deprecated way
/// let ninf = std::f64::NEG_INFINITY;
///
/// // intended way
/// let ninf = f64::NEG_INFINITY;
/// ```
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
const
NEG_INFINITY
:
f64
=
f64
::
NEG_INFINITY
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录