###### Abstract
For example, when a function is divided into four segments to approximate, each segment is a linear function of one variable, and the actual slope values are 0.10001, 0.00011, 0.11001, and 0.01001, respectively. We suppose kw = 2. As for ML-PLAC, the four slope values involved in the calculation are, respectively, 0.1, 0, 0.11, 0.01, while as for OML-PLAC the four values are 0.10001, 0.00011, 0.11, 0.01001. Where the fractional bit widths of the input and intermediate data are named iw and qw, assume that iw = qw = \(n\) and \(n\) > 5. The SAA parts of ML-PLAC and OML-PLAC are shown in Figure 1. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**PWL Methods** & **Segmentation Criteria** & **Optimizations** & **Features** \\ \hline \multirow{4}{*}{uniform segmentation} & \multirow{4}{*}{Same segment widths.} & Optimize according to the properties of specific functions; & Good performance for specific functions; \\  & & Error modification. & More segments with the increase in accuracy. \\ \hline \multirow{4}{*}{non-uniform segmentation (not error-flattened)} & MRE; & \multirow{4}{*}{\begin{tabular}{} \end{tabular} } & Optimize according to the properties of specific functions; \\  & & & Poor hardware efficiency. \\ \cline{1-1}  & & & \\ \cline{1-1}  & & & \\ \cline{1-1}  & & & \\ \hline \multirow{4}{*}{error flattening segmentation} & MAE. & \multirow{4}{*}{\
\begin{tabular}{} \end{tabular} } & \multirow{4}{*}{
\begin{tabular}{} \end{tabular} } \\ \cline{1-1}  & & & \\ \cline{1-1}  & & & \\ \cline{1-1}  & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The comparison of the different PWL methods. As can be seen from Figure 1, some inputs of multiplexers in ML-PLAC are 0, which does not happen in OML-PLAC. To some extent, 0 inputs cause the waste of the multiplexers. In fact, slope approximation in OML-PLAC is a better approximation of the actual slope value and has less error. Introducing this mechanism into quantization and segmentation can reduce the number of segments, which is a benefit for area and delay of hardware realization. Furthermore, decreasing the value of kw does not increase the number of segments in some cases compared to ML-PLAC, resulting in less shift-and-adder resources. Although the new segmentation method brings a slight increase in the number of multiplexer inputs in the SAA parts sometimes, the overall performance improvement is significant. The second improvement is the MAE adaptation. In previous advanced segmentation techniques [26,29], the MAE of the last segment tends to be much smaller than the predefined error. This makes it possible to readjust segments and improve errors. We do this in the following segmentation steps:  
1. Initialize the predefined maximum absolute error (MAE\({}_{\text{def}}\)), the fractional bit widths of the input (iw) and intermediate data (qw), and the num of ones in slope value (kw);
2. Calculate the segments, record the original number of segments, the actual MAE and other information about each segment;
3. Take the actual MAE as the maximum error limit (EC_max), take \(2^{-\text{max(iw,qw)}}\) as the minimum error limit (EC_min), and take the average of EC_max and EC_min as the new predefined MAE;
4. Recalculate the segments, record the number of segments;
5. If the number of segments is equal to the original number of segments, then take the new predefined MAE as EC_max and take the average of EC_max and EC_min as the new predefined MAE. Otherwise, take the new predefined MAE as EC_min and take the average of EC_max and EC_min as the new predefined MAE;
6. Predefine error iteration number cycle_num, and do cycle_num times of loop iteration, record the final segments, slope, y-intercept and MAE. The third improvement concerns the hardware architecture. We adopt a tree-cascaded architecture to implement the multi-input multiplexer. Nodes in the tree network are 2-input and 3-input multiplexers. We try to balance the tree structure so that each input path delay is basically the same.