From 02ac28229aa6824455e2cbc2389355575913041a Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 25 Jul 2012 20:42:04 -0700 Subject: eval: fix printing of NaN in eval fate test. This fixes "make fate-eval" on MSVC builds. Without this, the test outputs "-1.#NaN" instead of "nan" on MSVS 2010. --- libavutil/eval.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libavutil/eval.c') diff --git a/libavutil/eval.c b/libavutil/eval.c index ff3191de62..d274272205 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -636,7 +636,10 @@ int main(int argc, char **argv) av_expr_parse_and_eval(&d, *expr, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, NULL); - printf("'%s' -> %f\n\n", *expr, d); + if (isnan(d)) + printf("'%s' -> nan\n\n", *expr); + else + printf("'%s' -> %f\n\n", *expr, d); } av_expr_parse_and_eval(&d, "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)", -- cgit v1.2.3