Will irrational parameters make a problem not well-defined on complexity


Given a set $ 𝑁=\{𝑎_1,⋯,𝑎_𝑛\}$ where all $ 𝑎_𝑖$ s are rational positive numbers and $ \sum_{i\in N}a_i=1$ , find a subset 𝑆⊆𝑁 such that $ (\sqrt{2\sum_{i\in S}a_i}-1)^2$ is minimized. Does the appearance of √ make the problem ill-defined with regrading to complexity? If well-defined, it is NP-hard, right?