## Coherent Calculator

### 计算逻辑

• Formula
• Bigger N
• Smaller N
• Bigger M
• Smaller M

#### Formula

``````         Calculate stretegy
1. Force N to Nth power of 2
2. With Fs and Ft fixed, calculate M based on N
3. Force calculated M to the nearest prime number
4. Recalculate Fs based on the resulted M
``````

#### Bigger N

``````         Calculate stretegy
1. Force nudN to (N+1)th power of 2
2. With N and Ft fixed, calculate M based on given Fs
3. Force calculated M to the nearest prime number
4. Recalculate Fs based on the calculated M
``````

#### Smaller N

``````         Calculate stretegy
1. Force nudN to (N-1)th power of 2
2. With Fs and Ft fixed, calculate M based on N
3. Force calculated M to the nearest prime number
4. Recalculate Fs based on the calculated M
``````

#### Bigger M

``````         Calculate stretegy
1. Force cbboxM to the bigger prime number
2. With Fs and Ft fixed, calculate the N with the resulted M;
``````

#### Smaller M

``````         Calculate stretegy
1. Force cbboxM to the smaller prime number
2. With Fs and Ft fixed, calculate the N with the resulted M;``````