Problems with double variables

Hello!
I'm currently programming a new project of mine and ran into the following issue.
When I perform the calculation (20/40)/2, the result is not the expected 0.25, but rather 0.
I've managed to recreate this issue in the following script.
void main()
{
double x=(20/40)/2;
alert("Result", x);
}
If you have any ideas about fixing this problem, please tell me, since I need a exact output for my program.
I also tryed it with simple floats, that didn't work either though.
Regards
Taurus Fan

double x = tinyexpr("(20 / 40) / 2");

Thanks a lot, now it works. :slight_smile: