public static function is_valid_number(string $x) : bool {
        $ap = new qtype_numerical_answer_processor(array());
        list($value, $unit) = $ap->apply_units($x);
        return !is_null($value) && !$unit;
    }