[FFmpeg-cvslog] eval: test isnan(sqrt(-1)) instead of just sqrt(-1)

Anton Khirnov git at videolan.org
Fri Sep 23 00:37:48 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Sep 21 20:25:19 2011 +0200| [775af761a0805b2523923636020c5aebf764af13] | committer: Anton Khirnov

eval: test isnan(sqrt(-1)) instead of just sqrt(-1)

sqrt(-1) returns "some NaN", it's not specified which exactly.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=775af761a0805b2523923636020c5aebf764af13
---

 libavutil/eval.c    |    2 +-
 tests/ref/fate/eval |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavutil/eval.c b/libavutil/eval.c
index 4126cd7..9941ed7 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -608,7 +608,7 @@ int main(int argc, char **argv)
         "ceil(123.123)",
         "ceil(-123.123)",
         "sqrt(1764)",
-        "sqrt(-1)",
+        "isnan(sqrt(-1))",
         "not(1)",
         "not(NAN)",
         "not(0)",
diff --git a/tests/ref/fate/eval b/tests/ref/fate/eval
index 0e4844e..ef50292 100644
--- a/tests/ref/fate/eval
+++ b/tests/ref/fate/eval
@@ -136,8 +136,8 @@ Evaluating 'ceil(-123.123)'
 Evaluating 'sqrt(1764)'
 'sqrt(1764)' -> 42.000000
 
-Evaluating 'sqrt(-1)'
-'sqrt(-1)' -> -nan
+Evaluating 'isnan(sqrt(-1))'
+'isnan(sqrt(-1))' -> 1.000000
 
 Evaluating 'not(1)'
 'not(1)' -> 0.000000



More information about the ffmpeg-cvslog mailing list