Use transform calculating string to boolean

The title may be hard to understand but i will try my best to explain: (also, sorry for worst english ever)
So, i want to create a function which can be able to transform if expression as string:
“(true == 78 > 0.3f - (5*6/6.1f) && (!false || 9.938f < 506))” will return “true” as boolean (if i didn’t make any error). I search on web on i found this image, Click here, This image explain how if work, i have tried to reproduce it but, i wasn’t able to operate bracket.

if(any one can help me) {

You need an “expression parser”. I’ve had good luck with FLEE in the past.