Also, to mitigate the problem somewhat, one could obfuscate the order at which the numbers were pressed by setting a custom pin with repeating numbers. Ideally, just repeating one./s
function calc_formula({a, b, is_gain}){
...
}
calc_formula({a:1, b:2, is_gain:true})