As you know, the value of pi
with some decimals is 3.141592653589...
Write an expression using all digits (0-9) once each, to achieve the closest
value to pi
. The digits must be in the order 1, 2, 3, 4, ...8, 9, 0. You may also use as many parentheses, +, -, /, and *, as you wish, but only these symbols.
As an example: 123/45 - 6/7 + 8/9 + 0 = 2.765079... gives a difference of approximately 0.376.
You may post the difference or the approximation you achieve in the subject of your comment.
(In reply to this one beats them all : less than 10^-9
by Ady TZIDON)
the computer checked only for digits in normal order 1,2,3 ...0.
How about checking for any sequence trying to achieve even better approximation, pandigital but not sequential...
It will probably require 9*9! times more runtime,
but iut is a serious challenge since the approximation I have posted was known in pre-computer time..
Go, pick up the glove, it is worth it...