Is there a Quick Way to Evaluate $\pi^3$ By Hand?

We ran into a question on a computer science test that basically asked what is $\pi^3$ rounded up to the nearest whole number. The value of $\pi$ as defined by the programming language was $3.141592653589793$ and afterwards, we found out we would've needed to go to $3.1415$ to get the right answer. The difficult part is that the test allows no calculator, and you get on average one minute per question. Maybe there's some easy trick to solve this?

EDIT: Exact question:

What is the output by the code to the right?

System.out.println(Math.ceil(Math.pow(Math.PI, (int) Math.round(Math.max(3.45, 3.3)))));

(The language is Java)

• I'm concerned about the word "basically"... do you happen to have the exact text of the question? – The Count Mar 1 '18 at 0:49
• With a calculator $\pi^3 = 31.006...$ so clearly not a reasonable exam question. I concur with @TheCount - we need the exact wording. – Ethan Bolker Mar 1 '18 at 0:52
• Now that you have the edit: I am strictly not at all a computer scientist, but you may get more slick answers over on the CS site. – The Count Mar 1 '18 at 0:59
• @TheCount There are some slick math answers under Proving $\pi^3 \gt 31$. – dxiv Mar 1 '18 at 1:15
• I hate it. If you ceiling up $\pi$ you get $32$ but it's so close to $31$ that any approximations $3\frac 18$ or $\sqrt 10$ or $3\frac 17$ won't give you a very good idea whether it goes over $31$ or not. – fleablood Mar 1 '18 at 1:24

Remember that $\sqrt{10}=3.1622$ is close to $\pi =3.1415$.
Therefor $\pi ^3$ is approximated by $10\pi =31.4159$ which is closest to the integer $31$.
The ceiling of $\pi ^3$ is then $32.$
• I suppose this depends on knowing $\sqrt{10}$ to four decimals as common knowledge, but I do like it. – The Count Mar 1 '18 at 0:58
• Don't need to know $\sqrt {10}$ at all. If $\pi\approx \sqrt{10}$ then $\pi^2 \approx 10$ and $\pi^3 \approx 10\pi$. What I don't like about this is that we are expected to trust that $\pi \approx \sqrt 10$ is within acceptable margin of error? And that $3.1$ and $3.2$ are not? – fleablood Mar 1 '18 at 1:01
• It is the other way around $\sqrt{10} \approx \pi$ – Mohammad Riazi-Kermani Mar 1 '18 at 1:08
• 31.4159 which is closest to the integer 31 But rounds up to $32$, which is what the question was asking for. The result is still correct, but the justification is not obvious. – dxiv Mar 1 '18 at 1:36
• @EthanBolker May be interesting to note that the roughest rational approximation gives the much better estimate $\,(22/7)^3 = 31.04\ldots\,$, which hints at the correct answer of $\,32\,$, but is still not enough to prove it. – dxiv Mar 1 '18 at 1:38