diff --git a/docs/maths/ratio.md b/docs/maths/ratio.md index 4cb2f3f4..cb45e014 100644 --- a/docs/maths/ratio.md +++ b/docs/maths/ratio.md @@ -26,42 +26,46 @@ struct ratio If `INT_MAX` > `INT32_MAX` ```cpp -typedef ratio<1, 1000000000000000000000000> yocto; -typedef ratio<1, 1000000000000000000000> zepto; -typedef ratio<1, 1000000000000000000> atto; -typedef ratio<1, 1000000000000000> femto; -typedef ratio<1, 1000000000000> pico; +typedef ratio<1, 1000000000000000000LL * 1000000000000LL> quecto; +typedef ratio<1, 1000000000000000000LL * 1000000000LL> ronto; +typedef ratio<1, 1000000000000000000000000LL> yocto; +typedef ratio<1, 1000000000000000000000> zepto; +typedef ratio<1, 1000000000000000000> atto; +typedef ratio<1, 1000000000000000> femto; +typedef ratio<1, 1000000000000> pico; ``` If `INT_MAX` >= `INT32_MAX` ```cpp -typedef ratio<1, 1000000000> nano; -typedef ratio<1, 1000000> micro; +typedef ratio<1, 1000000000> nano; +typedef ratio<1, 1000000> micro; ``` If `INT_MAX` >= `INT16_MAX` ```cpp -typedef ratio<1, 1000> milli; -typedef ratio<1, 100> centi; -typedef ratio<1, 10> deci; -typedef ratio<10, 1> deca; -typedef ratio<100, 1> hecto; -typedef ratio<1000, 1> kilo; +typedef ratio<1, 1000> milli; +typedef ratio<1, 100> centi; +typedef ratio<1, 10> deci; +typedef ratio<10, 1> deca; +typedef ratio<100, 1> hecto; +typedef ratio<1000, 1> kilo; ``` If `INT_MAX` >= `INT32_MAX` ```cpp -typedef ratio<1000000, 1> mega; -typedef ratio<1000000000, 1> giga; +typedef ratio<1000000, 1> mega; +typedef ratio<1000000000, 1> giga; ``` If `INT_MAX` > `INT32_MAX` ```cpp -typedef ratio<1000000000000, 1> tera; -typedef ratio<1000000000000000, 1> peta; -typedef ratio<1000000000000000000, 1> exa; -typedef ratio<1000000000000000000000, 1> zetta; -typedef ratio<1000000000000000000000000, 1> yotta; +typedef ratio<1000000000000, 1> tera; +typedef ratio<1000000000000000, 1> peta; +typedef ratio<1000000000000000000, 1> exa; +typedef ratio<1000000000000000000000, 1> zetta; +typedef ratio<1000000000000000000000000LL, 1> yotta; +typedef ratio<1000000000000000000LL * 1000000000LL, 1> ronna; +typedef ratio<1000000000000000000LL * 1000000000000LL, 1> quetta; ``` An approximation of PI to 6 digits. @@ -74,6 +78,11 @@ An approximation of root 2. typedef ratio<239, 169> ratio_root2; ``` +An approximation of 1 over root 2. +```cpp +typedef ratio<169, 239> ratio_1_over_root2; +``` + An approximation of e. ```cpp typedef ratio<326, 120> ratio_e;