perf expr: Allow NaN to be a valid number
authorIan Rogers <irogers@google.com>
Fri, 9 Feb 2024 20:49:44 +0000 (12:49 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 13 Feb 2024 21:47:08 +0000 (13:47 -0800)
commit4ea7d94407b4cbc04cd0d610e38171c277cc601e
tree5a10d61e23b5f409604a86971011eb4bcd03f038
parent923e4616ec15b7feabdc353b229762069eb73c43
perf expr: Allow NaN to be a valid number

Currently only floating point numbers can be parsed, add a special
case for NaN.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Kaige Ye <ye@kaige.org>
Cc: John Garry <john.g.garry@oracle.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240209204947.3873294-2-irogers@google.com
tools/perf/util/expr.l