MCPcopy Create free account
hub / github.com/Gecode/gecode / randFValUp

Function randFValUp

test/float.cpp:125–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 Gecode::FloatNum randFValUp(Gecode::FloatNum l, Gecode::FloatNum u, Gecode::Support::RandomGenerator& rand) {
126 using namespace Gecode;
127 using namespace Gecode::Float;
128 Rounding r;
129 return
130 r.sub_up(
131 u,
132 r.mul_down(
133 r.div_down(
134 rand(static_cast<unsigned int>(Int::Limits::max)),
135 static_cast<FloatNum>(Int::Limits::max)
136 ),
137 r.sub_down(u,l)
138 )
139 );
140 }
141
142
143 TestSpace::TestSpace(int n, Gecode::FloatVal& d0, Gecode::FloatNum s,

Callers 1

pruneMethod · 0.85

Calls 4

sub_upMethod · 0.45
mul_downMethod · 0.45
div_downMethod · 0.45
sub_downMethod · 0.45

Tested by

no test coverage detected