{'fraction_non_alphanumeric': 0.02224199288256228, 'fraction_numerical': 0.0026690391459074734, 'mean_word_length': 5.2154696132596685, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Optimized Logarithmic Converter With Equal Distribution of Relative Errors

State-of-the-art piecewise logarithmic converters employ nonuniform segments to reduce the variance of relative errors, particularly for small inputs. However, it is difficult to have an optimized algorithm to accurately choose the nonuniform segments for a required approximation error. In this brief, we present a relative error equal distribution (REED) algorithm that performs the nonuniform piecewise linear interpolation of logarithm. It is able to precisely set the nonuniform piecewise points so that the relative error of each segment is within an upper bound, and finally produce a flat relative error distribution. It can be applied to any number of segments, even if the number is not the power of 2. Experimental results show that our REED algorithm achieves over 70% reduction of average relative errors for the benchmark graphics application, compared to both the state-of-the-art uniform and nonuniform methods. Synthesis results show that our hardware resources are comparable to that of the state-of-the-art nonuniform methods.