Skip to content

Commit dc84dfb

Browse files
committed
fix findRoot test
1 parent 974162b commit dc84dfb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

source/mir/numeric.d

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -611,10 +611,7 @@ version(mir_test) @safe unittest
611611
//numCalls=0;
612612
//++numProblems;
613613
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);
614+
auto result = findRoot!f(x1, x2).validate;
618615

619616
auto flo = f(result.ax);
620617
auto fhi = f(result.bx);
@@ -630,8 +627,8 @@ version(mir_test) @safe unittest
630627
//++numCalls;
631628
if (x>float.max)
632629
x = float.max;
633-
if (x<-double.max)
634-
x = -double.max;
630+
if (x<-float.max)
631+
x = -float.max;
635632
// This has a single real root at -59.286543284815
636633
return 0.386*x*x*x + 23*x*x + 15.7*x + 525.2;
637634
}

0 commit comments

Comments
 (0)