[swift-evolution] [Proposal] Random Unification
Mike Kluev
mike.kluev at gmail.com
Wed Jan 10 18:28:27 CST 2018
on Thu, 11 Jan 2018 00:02:18 +0100 Jens Persson <jens at bitcycle.com> wrote:
If there should be an API to produce a random Double without parameters
> then IMHO it should simply be a uniformly distributed Double in the unit
> range [0, 1). Very useful as a basic building block...
[0..1) sounds reasonable. even if disregard +/- zeroes, infinities, NAN's,
etc., uniform distribution between Double.min ... Double.max makes little
sense.
and it shall be relatively easy to bit cast UInt64 to Double for those who
want to test various double patterns (e.g. for testing).
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20180111/0676cb20/attachment.html>
More information about the swift-evolution
mailing list