Skip to content

Commit 33713bc

Browse files
author
Robin Kruppe
committed
drive-by doc fixes
1 parent cc68f2c commit 33713bc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/etc/test-float-parse/runtests.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
2222
The actual tests (generating decimal strings and feeding them to dec2flt) is
2323
performed by a set of stand-along rust programs. This script compiles, runs,
24-
and supervises them. In particular, the programs report the strings they
25-
generate and the floating point numbers they converted those strings to.
24+
and supervises them. The programs report the strings they generate and the
25+
floating point numbers they converted those strings to, and this script
26+
checks that the results are correct.
2627
2728
You can run specific tests rather than all of them by giving their names
2829
(without .rs extension) as command line parameters.
@@ -64,9 +65,9 @@
6465
exit code that's not 0, the test fails.
6566
The output on stdout is treated as (f64, f32, decimal) record, encoded thusly:
6667
67-
- The first eight bytes are a binary64 (native endianness).
68-
- The following four bytes are a binary32 (native endianness).
69-
- Then the corresponding string input follows, in ASCII (no newline).
68+
- First, the bits of the f64 encoded as an ASCII hex string.
69+
- Second, the bits of the f32 encoded as an ASCII hex string.
70+
- Then the corresponding string input, in ASCII
7071
- The record is terminated with a newline.
7172
7273
Incomplete records are an error. Not-a-Number bit patterns are invalid too.

src/libcore/num/dec2flt/algorithm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ fn algorithm_r<T: RawFloat>(f: &Big, e: i16, z0: T) -> T {
127127
// This is written a bit awkwardly because our bignums don't support
128128
// negative numbers, so we use the absolute value + sign information.
129129
// The multiplication with m_digits can't overflow. If `x` or `y` are large enough that
130-
// we need to worry about overflow, then they are also large enough that`make_ratio` has
130+
// we need to worry about overflow, then they are also large enough that `make_ratio` has
131131
// reduced the fraction by a factor of 2^64 or more.
132132
let (d2, d_negative) = if x >= y {
133133
// Don't need x any more, save a clone().

0 commit comments

Comments
 (0)