On 2012-03-01 10:52:49 +0000, Magnus Lie Hetland said:

I could just use

  uniform(cast(T) -1, cast(T) 1)*T.max

I guess (for some floating-point type T). Seems to work fine, at least.

Aaactually, not so much. The output here seems to get about the same exponent as T.max. Which isn't all that surprising, I guess. (Then again, most floating-point numbers *are* pretty large ;-)

So ... any suggestions?

--
Magnus Lie Hetland
http://hetland.org

Reply via email to