
Matthew Mundell wrote:
- 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?
I don't think this is the right way to do it. Why do you need to modify configure.ac? We should have the specializations of std::numeric_limits also for checked numbers (I am sure I raised this point with Abramo in the past). If we don't have them, we should add them.
Abramo? Are they done? If not, do you prefer to add them or to give some pointers to Matthew about how/where to add them? Ciao,
Roberto