Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

2.060 fixes.

  • Loading branch information...
commit 34c49387969a39abf04e61845290f4afbb0c41f5 1 parent 3dec1a6
@dsimcha dsimcha authored
Showing with 4 additions and 4 deletions.
  1. +3 −3 scid/demos/zmat.d
  2. +1 −1  scid/util.d
View
6 scid/demos/zmat.d
@@ -16,7 +16,7 @@ void zMatOpsTest() {
enforceMatData( c, 2, 3, [ 18 + 19i, 33 + 22i, 45 - 8i, 60 - 23i, 72 -35i, 87 - 68i ] );
- c[] = c[0 .. 2][ 0 .. 2 ].t * ( (b[][0] - a[1..3][0]).t * eval(c[][0]) ) / (10.+0.i);
+ c[] = c[0 .. 2][ 0 .. 2 ].t * ( (b[][0] - a[1..3][0]).t * eval(c[][0]) ) / (cast(cdouble) 10.);
enforceMatData( c, 2, 2, [-146.60 + 192.80i, -422.00 - 28.60i, -281.60 + 235.40i, -575.00 - 151.60i] );
c[] = c + zGeMat([[150-190i,280-230i], [430+28i,570+150i]]);
@@ -30,7 +30,7 @@ void zMatOpsTest() {
enforce( abs(s[1][0] - (-29.360 - 7.040i)) <= 1e-3 );
- auto d = eval( s - zSyMat([80.+0.i,-28,59]) );
+ auto d = eval( s - zSyMat([80.+0i,-28,59]) );
static assert( is( typeof(d) : zSyMat ) );
enforceMatData( d, 2, 2, [ 3.76 + 0.0i, -1.36 + 7.04i, 0.28 + 0.0i ] );
@@ -39,7 +39,7 @@ void zMatOpsTest() {
enforce( abs(d[1][0] - (-1.36 - 7.04i)) <= 1e-3 );
- auto e = eval( d + b[0..2][1..3]*(10.+0.i) );
+ auto e = eval( d + b[0..2][1..3]*(10.+0i) );
static assert( is( typeof(e) : zGeMat ) );
enforceMatData( e, 2, 2, [ 33.760 + 0.000i, 38.640 - 17.040i, 48.640 - 12.960i, 60.280 - 30.000i] );
View
2  scid/util.d
@@ -75,7 +75,7 @@ body
// lhs and rhs are real
return
feqrel!(CommonType!(L, R))(lhs, rhs) > significantDigits*LOG2T
- || abs(lhs - rhs) <= maxAbsDiff;
+ || scid.common.testing.abs(lhs - rhs) <= maxAbsDiff;
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.