npm.nicfv.com

    Function error

    • Calculate the relative normalized error or deviation from any value to an accepted value. An error of 0 indicates that the two values are identical. An error of -0.1 indicates that the experimental value is 10% smaller than (90% of) the accepted value. An error of 1.0 indicates that the experimental value is 100% greater (or twice the size) of the accepted value.

      Parameters

      • experimental: number

        The value observed or produced by a test

      • actual: number

        The accepted or theoretical value

      Returns number

      The relative (normalized) error

      const e = SMath.error(22.5, 25); // -0.1
      
    MMNEPVFCICPMFPCPTTAAATR