def compare_to_nist(y_comp, y_nist):
    """
    Compute signed relative error based on NIST value.
    
    Inputs:
        
        y_comp: double, array of values to compare with NIST
        
        y_nist: double, NIST reference value
        
    
    Outputs:
    
        err: double, relative error
    """
    err = ((y_comp - y_nist) / (1+y_nist))
    err[err==0]=1e-30
    return err