This question is related to my [previous question](https://codereview.stackexchange.com/q/156319/118395) on the brute-force search 
for a solution to an unsolved mathematical inequality:

$$3^{k}-2^{k}\left\lfloor \left({\tfrac {3}{2}}\right)^{k}\right\rfloor >2^{k}-\left\lfloor \left({\tfrac {3}{2}}\right)^{k}\right\rfloor -2$$

The following code, tested on Ubuntu 16.04, compiles with no warnings or errors using the flags `-Wall -std=c++14 -pthread -Ofast` using the g++ compiler. I'm using `-Ofast` because I am trying to squeeze every ounce of performance out of this code ([more info here](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html)).

I am not 100% sure if this is the proper, fastest, implementation of multithreading. Since I'm new to multithreading, I used [this SO question](https://stackoverflow.com/questions/7686939/c-simple-return-value-from-stdthread), [this page](http://en.cppreference.com/w/cpp/thread/async), and [this page](http://www.cplusplus.com/reference/future/async/) for learning how to multithread.

For questions about other parts of the code, I explain it way more on [my previous question](https://codereview.stackexchange.com/q/156319/118395) (like why I have a completely separate `if`-`else` check).

Let me know how I can improve my use of multithreading in this program.

```
#include <boost/multiprecision/cpp_dec_float.hpp>
//#include <cmath> (already included from cpp_dec_float.hpp)
#include <iostream>
#include <future>

typedef boost::multiprecision::number<boost::multiprecision::cpp_dec_float<2000>> arbFloat;

enum returnID {success = 0, precisionExceeded = 1};

arbFloat calcThreeK(const arbFloat & k){
    return pow(3, k);
}

arbFloat calcTwoK(const arbFloat & k){
    return pow(2, k);
}

int main(){
    arbFloat k, threeK, twoK;
    bool isSolution = false;

    for(k = 6; !isSolution; ++k){
        std::future<arbFloat> futureThreeK = std::async(std::launch::async, calcThreeK, k);
        std::future<arbFloat> futureTwoK = std::async(std::launch::async, calcTwoK, k);

        threeK = futureThreeK.get();
        twoK = futureTwoK.get();

        isSolution = threeK - twoK * floor(threeK / twoK) > twoK - floor(threeK / twoK) - 2;
    }

    if(pow(3, k) - (pow(2, k) * floor(pow(1.5, k))) <= pow(2, k) - floor(pow(1.5, k)) - 2){
        std::cout << "Solution at k = " << k << ".\n";
        return returnID::success;
    } else {
        std::cout << "Error: Precision exceeded at k = " << k << ".\n";
        return returnID::precisionExceeded;
    }
}

```