Boost logo

Boost :

Subject: Re: [boost] [endian] Testing floating point interoperability
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-03-18 11:20:14


On 03/18/2015 07:24 AM, Beman Dawes wrote:
> On Fri, Jan 30, 2015 at 5:25 AM, Paul A. Bristow
> <pbristow_at_[hidden]> wrote:
>> You can't test all possible values (except for 32-bit float - 64-bit double takes about 50 years at
>> current processor speeds ;-)
>> but you can chose values (floating-point bit patterns) at random for a test lasting some minutes or
>> even hours.
> Could you provide the random number generation and otherwise help with
> this? I've only ever used integer RNGs.

Since you want to test random bit patterns,
the easiest way is to generate a 64-bit
integer and memcpy it to a double.

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at