J. Eur. Opt. Society-Rapid Publ. 22, 31( 2026) 315
Table
3. Counts of arithmetic instructions for a Zernike component z m n
, where sin and cos components of even and odd orders are considered separately. Computations Count of Multiplication() Count of addition(+)
x 2j�2l�1 y 2lþ1 jðjþ1Þ j1; 0lj 2
0
x 2j�2l y 2l ðjþ1Þðjþ2Þ j0; 0lj 2
� 2 0
x 2j�2l y 2lþ1 ðjþ1Þðjþ2Þ j0; 0lj 2
� 1 0
x 2j�2lþ1 y 2l ðjþ1Þðjþ2Þ 2
� 1 0 z �2l 2j z þ2l 2j z �ð2lþ1Þ 2jþ1 z þð2lþ1Þ 2jþ1 j0; 0lj ðjþlÞðj�lþ1Þ 2 ðjþlþ1Þðj�lÞþ2ðjþ1Þ 2 ðjþlþ1Þðj�lÞþ2ðjþ1Þ 2 ðjþlþ1Þðj�lÞþ2ðjþ1Þ 2
ðjþlÞðj�lþ1Þ 2
� 1
ðjþlþ1Þðj�lÞþ2ðjþ1Þ 2
� 1 ðjþlþ1Þðj�lÞþ2ðjþ1Þ 2
� 1 ðjþlþ1Þðj�lÞþ2ðjþ1Þ 2
� 1
Figure 1. Comparison of computational complexity( I):( a) number of multiplications;( b) number of additions. Four curves in( a) show the maximum and minimum multiplication requirements for the component-wise recursion method and the direct transformation method for a required Zernike component at one( x, y) position; the same applies to four curves in( b) for addition operations.
polynomial order while the component-wise recursive method appears to be exponentially relevant. This advantage stems from the inherent compatibility between the block-wise recursive method and modern hardware technology in civilian commercial computers.
4.2 Computational accuracy: a preliminary evaluation
Figure 2. Comparison of computational complexity( II): Time elapsed for generating all Zernike components up to order 99 using component-wise recursion( red) compared to block-wise recursion( blue):( a) the comparison;( b) further details on the elapsed time of block-wise recursion( with y-axis 1.5 ms). The comparison was performed for one( x, y) position, and the elapsed time is measured in millisecond( 10 �3 s).
In addition to the computational performance test described above, the computational accuracy was also compared using 120 spatial positions taken from 5 radius positions times 24 azimuth positions( see Fig. 3a). For each spatial position, all Zernike components from order 0 to order 99 were calculated using both the component-wise recursive method mentioned above([ 7 ]) and the block-wise recursive method based on Pascal’ s triangle( equation( 12)). For each order, the maximum absolute difference between the results of both methods was recorded; thus, a difference curve along polynomial orders was created for each position. All 120 curves were recorded during the test. They are shown in Figure 3 in two versions: the raw difference curves( b) and their logarithmic( log10) version( c).