Compare commits

..

No commits in common. "master" and "Initial-Release" have entirely different histories.

3 changed files with 8 additions and 5008 deletions

View File

@ -11,8 +11,6 @@ Output is saved as imprecision.txt, where the exe is run from.
See [Releases](/BrychanD/159.341_A3_ImprecisionFinder/releases) for a compiled version See [Releases](/BrychanD/159.341_A3_ImprecisionFinder/releases) for a compiled version
The Sample Data folder contains output data from the sequential run
``` ```
Sample output: Sample output:
7 dp 4 dp (.000001 .000005) 7 dp 4 dp (.000001 .000005)

File diff suppressed because it is too large Load Diff

View File

@ -52,9 +52,10 @@ namespace TextImprecision
{ {
decimalPos1 = i; decimalPos1 = i;
} }
if (nonMatchIndex1 == -1 && strDbl1[i < strDbl1.Length ? i : strDbl1.Length-1] != strDbl3[i < strDbl3.Length ? i : strDbl3.Length - 1] ) if (strDbl1[i < strDbl1.Length ? i : strDbl1.Length-1] != strDbl3[i < strDbl3.Length ? i : strDbl3.Length - 1])
{ {
nonMatchIndex1 = i; nonMatchIndex1 = i;
break;
} }
} }
@ -65,9 +66,10 @@ namespace TextImprecision
{ {
decimalPos2 = i; decimalPos2 = i;
} }
if (nonMatchIndex2 == -1 && strDbl2[i < strDbl2.Length ? i : strDbl2.Length - 1] != strDbl4[i < strDbl4.Length ? i : strDbl4.Length - 1]) if (strDbl2[i < strDbl2.Length ? i : strDbl2.Length - 1] != strDbl4[i < strDbl4.Length ? i : strDbl4.Length - 1])
{ {
nonMatchIndex2 = i; nonMatchIndex2 = i;
break;
} }
} }
@ -76,11 +78,11 @@ namespace TextImprecision
{ {
if (decimalPos1 > -1) if (decimalPos1 > -1)
{ {
output.Write("{0} dp", nonMatchIndex1 - decimalPos1 -1, strDbl1.Length < strDbl3.Length ? strDbl1.Length : strDbl3.Length); output.Write("{0} dp", nonMatchIndex1 - decimalPos1, strDbl1.Length < strDbl3.Length ? strDbl1.Length : strDbl3.Length);
} }
else else
{ {
output.Write("{0} sf", decimalPos1); output.Write("{0} sf", nonMatchIndex1);
} }
} }
@ -93,11 +95,11 @@ namespace TextImprecision
{ {
if (decimalPos2 > -1) if (decimalPos2 > -1)
{ {
output.Write("{0} dp", nonMatchIndex2 - decimalPos2 -1, strDbl2.Length < strDbl4.Length ? strDbl2.Length : strDbl4.Length); output.Write("{0} dp", nonMatchIndex2 - decimalPos2, strDbl2.Length < strDbl4.Length ? strDbl2.Length : strDbl4.Length);
} }
else else
{ {
output.Write("{0} sf", decimalPos2); output.Write("{0} sf", nonMatchIndex2);
} }
} }