Fix unittest, which assumes real > double.

This commit is contained in:
Bernhard Seckinger 2019-12-23 10:17:43 +01:00
parent cf71348d8d
commit 211dd50b6b

View file

@ -1498,8 +1498,8 @@ T findRoot(T, R)(scope R delegate(T) f, in T a, in T b,
//++numCalls; //++numCalls;
if (x>float.max) if (x>float.max)
x = float.max; x = float.max;
if (x<-double.max) if (x<-float.max)
x = -double.max; x = -float.max;
// This has a single real root at -59.286543284815 // This has a single real root at -59.286543284815
return 0.386*x*x*x + 23*x*x + 15.7*x + 525.2; return 0.386*x*x*x + 23*x*x + 15.7*x + 525.2;
} }