Longitude can be between 0~360 (long3) and -180~180 (long1). To convert from long3 to long1, use the formula below:
long1=mod((long3+180),360)-180 # Python: long1 = (lon3 + 180) % 360 - 180
To illustrate the values:
180, 181, ..., 359, 360/0, 1, ..., 179, 180 -180, -179, ... -1, 0, 1, ..., 179, 180