Anomalous result in arithmetic based on rounded pi

Code:
My original large code had such a problem, so I broke it down into the below smallest code sample:

public class test {
    static double precision = 2;

    public static void main(String[] args) {
        for (; precision < 100; precision++) {
            int PI = (int) Math.round(Math.PI * precision);

            double x1 = makePrecise(Math.PI / 2), x2 = makePrecise(PI / precision - Math.PI / 2);

            if (x1 == x2)
                System.out.println(precision + "t" + x1 + "t" + PI / precision + "t" + (x1 + x2));
        }
    }

    static double makePrecise(double num) {
        return Math.round(num * precision) / precision;
    }
}

My problem:

I do not understand why x1 == x2 only at some specific values of precision. Either they should be equal at all values of precision, or the values at which they are equal should follow a trend. Unfortunately, as you can see below, there is really no trend here. At lower values of precision, it’s like +3/+2/+2/+3/+2/+2/... but at higher precision values it’s like +1/+2/+2/+2/+1/+2/+2/+2/+1.... I do not exactly understand the underlying working here.

Please explain exactly why such a output is generated, especially since there doesn’t seem to be any trend in it.


Output: (for reference)

2.0 1.5 3.0 3.0
5.0 1.6 3.2 3.2
7.0 1.5714285714285714  3.142857142857143   3.142857142857143
9.0 1.5555555555555556  3.111111111111111   3.111111111111111
12.0    1.5833333333333333  3.1666666666666665  3.1666666666666665
14.0    1.5714285714285714  3.142857142857143   3.142857142857143
16.0    1.5625  3.125   3.125
19.0    1.5789473684210527  3.1578947368421053  3.1578947368421053
21.0    1.5714285714285714  3.142857142857143   3.142857142857143
23.0    1.565217391304348   3.130434782608696   3.130434782608696
26.0    1.5769230769230769  3.1538461538461537  3.1538461538461537
28.0    1.5714285714285714  3.142857142857143   3.142857142857143
30.0    1.5666666666666667  3.1333333333333333  3.1333333333333333
33.0    1.5757575757575757  3.1515151515151514  3.1515151515151514
35.0    1.5714285714285714  3.142857142857143   3.142857142857143
37.0    1.5675675675675675  3.135135135135135   3.135135135135135
40.0    1.575   3.15    3.15
42.0    1.5714285714285714  3.142857142857143   3.142857142857143
44.0    1.5681818181818181  3.1363636363636362  3.1363636363636362
47.0    1.574468085106383   3.148936170212766   3.148936170212766
49.0    1.5714285714285714  3.142857142857143   3.142857142857143
51.0    1.5686274509803921  3.1372549019607843  3.1372549019607843
54.0    1.5740740740740742  3.1481481481481484  3.1481481481481484
56.0    1.5714285714285714  3.142857142857143   3.142857142857143
58.0    1.5689655172413792  3.1379310344827585  3.1379310344827585
60.0    1.5666666666666667  3.1333333333333333  3.1333333333333333
61.0    1.5737704918032787  3.1475409836065573  3.1475409836065573
63.0    1.5714285714285714  3.142857142857143   3.142857142857143
65.0    1.5692307692307692  3.1384615384615384  3.1384615384615384
67.0    1.5671641791044777  3.1343283582089554  3.1343283582089554
68.0    1.5735294117647058  3.1470588235294117  3.1470588235294117
70.0    1.5714285714285714  3.142857142857143   3.142857142857143
72.0    1.5694444444444444  3.138888888888889   3.138888888888889
74.0    1.5675675675675675  3.135135135135135   3.135135135135135
75.0    1.5733333333333333  3.1466666666666665  3.1466666666666665
77.0    1.5714285714285714  3.142857142857143   3.142857142857143
79.0    1.5696202531645569  3.1392405063291138  3.1392405063291138
81.0    1.5679012345679013  3.1358024691358026  3.1358024691358026
82.0    1.5731707317073171  3.1463414634146343  3.1463414634146343
84.0    1.5714285714285714  3.142857142857143   3.142857142857143
86.0    1.569767441860465   3.13953488372093    3.13953488372093
88.0    1.5681818181818181  3.1363636363636362  3.1363636363636362
89.0    1.5730337078651686  3.146067415730337   3.146067415730337
91.0    1.5714285714285714  3.142857142857143   3.142857142857143
93.0    1.5698924731182795  3.139784946236559   3.139784946236559
95.0    1.568421052631579   3.136842105263158   3.136842105263158
96.0    1.5729166666666667  3.1458333333333335  3.1458333333333335
98.0    1.5714285714285714  3.142857142857143   3.142857142857143