File: falsenegative.cc

package info (click to toggle)
simrisc 16.05.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,568 kB
  • sloc: cpp: 6,877; fortran: 665; makefile: 112; ansic: 112; sh: 107
file content (23 lines) | stat: -rw-r--r-- 601 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#define XERR
#include "loop.ih"

    // by maybefalsenegative.cc

bool Loop::falseNegative(ModBase *modBase)
{
    // modified using Jing Wang's email (Tue, 20 Oct 2020 16:04:42 +0000)
    if (
        double uval = Random::instance().uniform(),
               sval = sensitivity(modBase);
        //uval > sval
        sval < uval
    )
    {
        g_log << "    detected FALSE_NEGATIVE (" << uval <<
                    " > sensitivity (" << sval << ")\n";
        d_roundInfo[d_round] = FALSE_NEGATIVE;
        return true;
    }

    return false;           // not a false negative conclusion
}