Skip to content

Commit 1962c8b

Browse files
catamorphismptomato
authored andcommitted
Address further review feedback
1 parent a6043aa commit 1962c8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/duration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ <h1>
11841184
1. If abs(_months_) ≥ 2<sup>32</sup>, return *false*.
11851185
1. If abs(_weeks_) ≥ 2<sup>32</sup>, return *false*.
11861186
1. Let _normalizedNanoseconds_ be _days_ × 86,400 × 10<sup>9</sup> + _hours_ × 3600 × 10<sup>9</sup> + _minutes_ × 60 × 10<sup>9</sup> + _seconds_ × 10<sup>9</sup> + ℝ(𝔽(_milliseconds_)) × 10<sup>6</sup> + ℝ(𝔽(_microseconds_)) × 10<sup>3</sup> + ℝ(𝔽(_nanoseconds_)).
1187-
1. NOTE: The above step cannot be implemented directly using 64-bit floating-point arithmetic. Multiplying by 10<sup>-3</sup>, 10<sup>-6</sup>, and 10<sup>-9</sup> respectively may be imprecise when _milliseconds_, _microseconds_, or _nanoseconds_ is an unsafe integer. The step can be implemented using 128-bit integers. It could also be implemented in C++ with an implementation of `std::remquo()` with sufficient bits in the quotient. String manipulation will also give an exact result, since the multiplication is by a power of 10.
1187+
1. NOTE: The above step cannot be implemented directly using 64-bit floating-point arithmetic. Multiplying by 10<sup>-3</sup>, 10<sup>-6</sup>, and 10<sup>-9</sup> respectively may be imprecise when _milliseconds_, _microseconds_, or _nanoseconds_ is an unsafe integer. The step can be implemented by using 128-bit integers and performing all arithmetic on nanosecond values. It could also be implemented in C++ with an implementation of `std::remquo()` with sufficient bits in the quotient. String manipulation will also give an exact result, since the multiplication is by a power of 10.
11881188
1. If abs(_normalizedNanoseconds_) ≥ 10<sup>9</sup> × 2<sup>53</sup>, return *false*.
11891189
1. Return *true*.
11901190
</emu-alg>

0 commit comments

Comments
 (0)