I have a program running a numerical calculations with precision increasing in time. It does so for different values of some parameters. The precision I need for each results depends on the value of these parameters, in a way totally unknown to me.
To get enough precision for each value, I am thinking about a program/loop that would cut a calculation and move on to new values of the parameters if the user hits the keyboard.
Schematically:
//initialise parameters
while( parameters_in_good_range){
while( no_key_pressed){
//do calculation
}
//update parameters
}