###### Abstract  
In this paper, we propose an optimized method for nonlinear function approximation based on multiplierless piecewise linear approximation computation (ML-PLAC), which we call OML-PLAC. OML-PLAC finds the minimum number of segments with the predefined fractional bit width of input/output, maximum number of shift-and-add operations, user-defined widths of intermediate data, and maximum absolute error (MAE). In addition, OML-PLAC minimizes the actual MAE as much as possible by iterating. As a result, under the condition of satisfying the maximum number of segments, the MAE can be minimized. Tree-cascaded 2-input and 3-input multiplexers are used to replace multi-input multiplexers in hardware architecture as well, reducing the depth of the critical path. The optimized method is applied to logarithmic, antilogarithmic, hyperbolic tangent, sigmoid and softsign functions. The results of the implementation prove that OML-PLAC has better performance than the current state-of-the-art method. nonlinear function approximation; maximum absolute error (MAE); iterating; tree-cascaded multiplexer; logarithmic function; antilogarithmic function; hyperbolic tangent function; sigmoid function; softsign function 2022120162022202202202202202202202202202202202202202202202202202202202202220220220222022022202220222022202220222202222022220222220222222202222222222222222  
indirect look-up table approximation uses the special properties of functions and the Quine-McCluskey method to approximate the sigmoid and hyperbolic tangent functions [9]. It has good performance, but it is not suitable for high-precision situations. Different ways are used to optimize the implementation of logarithm function based on multipliers [10; 11; 12], but there is still a lot of room for improvement. Then the piecewise linear (PWL) method is proposed to reduce the computation complexity because only one MAC is required. PWL method uses (k \(\times\) x + b) to approximate each segment, and slope k, y-intercept b, and endpoints for each segment are stored in memory. As the approximate accuracy improves the number of segments will increase, which means more memory resources are required. At the same time, it will also bring about the deterioration of the timing. Therefore, many studies are devoted to reducing the number of segments and simplifying the operation to improve performance. PWL method develops from uniform segmentation to non-uniform segmentation and finally to error flattening segmentation. Uniform segmentation method divides the input into segments of equal length, and this method is used in [13] to approximate logarithmic function by minimizing the maximum relative approximation error (MRE) while computing accuracy is improved by a piecewise linear interpolation and an LUT-based correction stage in [14]. In [15], the optimal coefficients of the approximation function are obtained by Linear-Lagrange interpolation to obtain the best accuracy. Sigmoid and hyperbolic tangent functions are approximated by using the properties of functions at special points in [16; 17]. The biggest problem with uniform segmentation is that each segment has a different error, resulting in more segments. To overcome the shortcomings of the uniform segmentation method, the non-uniform segmentation method is proposed. 15 and 24 non-uniform segments are used in [18; 19], respectively, to compute logarithmic function, both of which increase the number of segments around input value 0 and achieve relatively high accuracy using acceptable number of segments. In [20], a non-uniform-segment-based PWL method is used to approximate transcendental functions, and to enhance the accuracy; Ref. [21] is segmented according to specific coefficients. A relative error equal distribution algorithm that divides the segments under the premise of MRE is proposed in [22], and finally achieves over 70% reduction in average relative errors compared to other methods.