
22 Sep
2005
22 Sep
'05
11:40 a.m.
- the matasciidumpload1 test fails for some choices of the Coefficient type.
This is just from the size of random numbers being generated in the test. I'm on it.
For this test I'd like to generate a positive random number within the bounds of the coefficient type. This requires the size of the coefficient type. Is there an existing way to this size?
I've thought of defining a directive in configure.ac, say COEFFICIENT_RAW_TYPE, and then calculating the random number as follows.
#if defined(NATIVE_INTEGERS) || defined(CHECKED_INTEGERS) tem = rand() % std::numeric_limits<COEFFICIENT_RAW_TYPE>::max(); #else tem = rand(); #endif
Is there a better way to do this?