num randomNum(int max) { var logic = randomBool(); var sign = randomSign(); if (logic) { return sign * randomInt(max); } else { return sign * randomDouble(max); } }