| 50 | | static assert(d != 0); |
|---|
| 51 | | static if(n != 0) |
|---|
| 52 | | { |
|---|
| 53 | | //pragma(msg,n.stringof~"/"~d.stringof); |
|---|
| 54 | | const int N = n / cast(int)gcd(n,d); |
|---|
| 55 | | const int D = cast(uint)(d / gcd(n,d)); |
|---|
| 56 | | const bool Reduced = (gcd(n,d) == 1); |
|---|
| 57 | | } |
|---|
| 58 | | else |
|---|
| 59 | | { |
|---|
| 60 | | const int N = 0; |
|---|
| 61 | | const int D = 1; |
|---|
| 62 | | const bool Reduced = (D == 1); |
|---|
| 63 | | } |
|---|
| 64 | | alias Tpl!(N,D) V; |
|---|
| | 50 | static assert(d != 0); |
|---|
| | 51 | static if(n != 0) |
|---|
| | 52 | { |
|---|
| | 53 | //pragma(msg,n.stringof~"/"~d.stringof); |
|---|
| | 54 | const int N = n / cast(int)gcd(n,d); |
|---|
| | 55 | const int D = cast(uint)(d / gcd(n,d)); |
|---|
| | 56 | const bool Reduced = (gcd(n,d) == 1); |
|---|
| | 57 | } |
|---|
| | 58 | else |
|---|
| | 59 | { |
|---|
| | 60 | const int N = 0; |
|---|
| | 61 | const int D = 1; |
|---|
| | 62 | const bool Reduced = (D == 1); |
|---|
| | 63 | } |
|---|
| | 64 | alias Tpl!(N,D) V; |
|---|