We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 974162b commit dc84dfbCopy full SHA for dc84dfb
source/mir/numeric.d
@@ -611,10 +611,7 @@ version(mir_test) @safe unittest
611
//numCalls=0;
612
//++numProblems;
613
assert(x1 == x1 && x2 == x2);
614
- auto result = findRoot!f(x1, x2);
615
-
616
- import std.conv: to;
617
- assert(result.status == FindRootStatus.success, line.to!string);
+ auto result = findRoot!f(x1, x2).validate;
618
619
auto flo = f(result.ax);
620
auto fhi = f(result.bx);
@@ -630,8 +627,8 @@ version(mir_test) @safe unittest
630
627
//++numCalls;
631
628
if (x>float.max)
632
629
x = float.max;
633
- if (x<-double.max)
634
- x = -double.max;
+ if (x<-float.max)
+ x = -float.max;
635
// This has a single real root at -59.286543284815
636
return 0.386*x*x*x + 23*x*x + 15.7*x + 525.2;
637
}
0 commit comments