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

Method solution

test/float/transcendental.cpp:274–278  ·  view source on GitHub ↗

%Test whether \a x is solution

Source from the content-addressed store, hash-verified

272 : Test("Transcendental::Pow::N::"+str(_base)+"::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false), base(_base) {}
273 /// %Test whether \a x is solution
274 virtual MaybeType solution(const Assignment& x) const {
275 if (base <= 0.0)
276 return MT_FALSE;
277 return eq(exp(x[0] * log(base)), x[1]);
278 }
279 /// Extend assignment \a x
280 virtual bool extendAssignment(Assignment& x) const {
281 if (base <= 0.0) return false;

Callers

nothing calls this directly

Calls 2

expFunction · 0.50
logFunction · 0.50

Tested by

no test coverage detected